From: JustAMacUser Date: Fri, 19 Feb 2016 06:35:11 +0000 (-0500) Subject: Remove srcset and sizes attributes from img tag if locally caching images. X-Git-Tag: 16.3~26^2^2 X-Git-Url: https://git.wh0rd.org/?p=tt-rss.git;a=commitdiff_plain;h=a01bfd78c2a8240a6f73ec16098fc8a3ff6e8663 Remove srcset and sizes attributes from img tag if locally caching images. --- diff --git a/include/functions2.php b/include/functions2.php old mode 100755 new mode 100644 index 7c714f56..ed22a062 --- a/include/functions2.php +++ b/include/functions2.php @@ -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);