Index: branches/5.1.x/core/units/helpers/image_helper.php =================================================================== diff -u -N -r13545 -r13569 --- branches/5.1.x/core/units/helpers/image_helper.php (.../image_helper.php) (revision 13545) +++ branches/5.1.x/core/units/helpers/image_helper.php (.../image_helper.php) (revision 13569) @@ -1,6 +1,6 @@ fileHelper =& $this->Application->recallObject('FileHelper'); + } + + /** * Parses format string into array * * @param string $format sample format: "resize:300x500;wm:inc/wm.png|c|-20" @@ -101,6 +115,9 @@ if ($needs_resize || array_intersect(array_keys($params), $transform_keys)) { // resize required OR watermarking required -> change resulting image name ! $dst_image = preg_replace('/^'.preg_quote($src_path, '/').'(.*)\.(.*)$/', $src_path . DIRECTORY_SEPARATOR . 'resized\\1_' . crc32(serialize($params)) . '.\\2', $src_image); + + $this->fileHelper->CheckFolder( dirname($dst_image) ); + if (!file_exists($dst_image) || filemtime($src_image) > filemtime($dst_image)) { // resized image not available OR should be recreated due source image change $params['dst_image'] = $dst_image;