When linking to imagefield images with specific size generated by imagecache loading the node (or view, page with the node) seems to force regeneration of linked image.

The following error is seen in the log file:

Cached image file <file> already exists but is being regenerated. There may be an issue with your rewrite configuration

Comments

sl27257’s picture

Assigned: Unassigned » sl27257
Status: Active » Needs review

Hi,

this is the solution I have implemented:

--- sites/all/modules/image_filter/image_filter.module.orig     2010-12-20 15:14:35.000000000 +0100
+++ sites/all/modules/image_filter/image_filter.module  2010-12-20 15:16:54.000000000 +0100
@@ -157,7 +157,9 @@ function image_filter_process($text) {
               $src = $filepath;
               foreach ($presets as $preset) {
                 $dst = imagecache_create_path($preset['presetname'], $filepath);
-                imagecache_build_derivative($preset['actions'], $src, $dst);
+                if (!file_exists($dst) ) {
+                  imagecache_build_derivative($preset['actions'], $src, $dst);
+                }
                 $image = image_get_info($dst);
                 if (empty($width) ||
                     $image ['width'] * $image['height'] < $width * $height) {

BR

/Thomas

sl27257’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)