summaryrefslogtreecommitdiff
path: root/src/web/helpers/image.php
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-06-29 19:32:45 -0400
committerFreya Murphy <freya@freyacat.org>2024-06-29 19:32:45 -0400
commitc40e478e80bdedfb545681ada7d4412bd440e44f (patch)
tree501c58ee8089786c6941326cc89ac255623cfec4 /src/web/helpers/image.php
parentfix the (diff)
downloadwebsite-c40e478e80bdedfb545681ada7d4412bd440e44f.tar.gz
website-c40e478e80bdedfb545681ada7d4412bd440e44f.tar.bz2
website-c40e478e80bdedfb545681ada7d4412bd440e44f.zip
hi
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);