Responsive images with srcset
-
Since 4.4 WordPress automatically generates responsive images for all img elements using srcset (announcement). This results in images which are not generated statically. Could you build support for these in the next update?
For now I’ve created my own workaround by altering “class-simply-static-url-extractor.php” on line 164:
$extracted_urls = explode(',', $extracted_url); $absolute_extracted_url = $this->add_to_extracted_urls( $extracted_urls[0] ); $element->setAttribute( $attribute_name, $absolute_extracted_url );
Instead of
$absolute_extracted_url = $this->add_to_extracted_urls( $extracted_url ); $element->setAttribute( $attribute_name, $absolute_extracted_url );
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Responsive images with srcset’ is closed to new replies.