summaryrefslogtreecommitdiff
path: root/src/web/helpers/image.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/helpers/image.php')
-rw-r--r--src/web/helpers/image.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/web/helpers/image.php b/src/web/helpers/image.php
index c18154a..8d58c1e 100644
--- a/src/web/helpers/image.php
+++ b/src/web/helpers/image.php
@@ -30,7 +30,9 @@ function __make_source(
$media = '';
}
$main = $GLOBALS['main_model'];
- $path = $main->get_url('public/' . $name . '.' . $format);
+ $file = $name . '.' . $format;
+ $time = filemtime($GLOBALS['publicroot'] . '/' . $file);
+ $path = $main->get_url('public/' . $file) . "?r={$time}";
$mime = __get_mime($format);
return sprintf('<source type="%s" srcset="%s" %s>',
$mime, $path, $media);