1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 18:25:55 +00:00

Remove srcset and sizes attributes from img tag if locally caching images.

This commit is contained in:
JustAMacUser
2016-02-19 01:35:11 -05:00
parent 1003f71e04
commit a01bfd78c2

8
include/functions2.php Executable file → Normal file
View File

@@ -912,6 +912,14 @@
if (file_exists($cached_filename)) {
$src = SELF_URL_PATH . '/public.php?op=cached_image&hash=' . sha1($src);
if ($entry->hasAttribute('srcset')) {
$entry->removeAttribute('srcset');
}
if ($entry->hasAttribute('sizes')) {
$entry->removeAttribute('sizes');
}
}
$entry->setAttribute('src', $src);