]> git.wh0rd.org Git - tt-rss.git/commitdiff
Remove srcset and sizes attributes from img tag if locally caching images.
authorJustAMacUser <donotreply@example.org>
Fri, 19 Feb 2016 06:35:11 +0000 (01:35 -0500)
committerJustAMacUser <donotreply@example.org>
Fri, 19 Feb 2016 06:35:11 +0000 (01:35 -0500)
include/functions2.php [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 7c714f5..ed22a06
 
                                        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);