diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index d1aa2537597..dd282b552c4 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -9207,7 +9207,11 @@ abstract class CommonObject $alt = $overwritetitle; } } - + if (empty($cache) && !empty($val['label'])) { + // label is md5 of file + // use it in url to say we want to cache this version of the file + $cache = $val['label']; + } if ($usesharelink) { if ($val['share']) { if (empty($maxHeight) || ($photo_vignette && $imgarray['height'] > $maxHeight)) {