Title: Responsive images with srcset
Last modified: August 31, 2016

---

# Responsive images with srcset

 *  Resolved [gjdenhertog](https://wordpress.org/support/users/gjdenhertog/)
 * (@gjdenhertog)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/responsive-images-with-srcset/)
 * Since 4.4 WordPress automatically generates responsive images for all img elements
   using srcset ([announcement](https://make.wordpress.org/core/2015/11/10/responsive-images-in-wordpress-4-4/)).
   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 );
       ```
   
 * [https://wordpress.org/plugins/simply-static/](https://wordpress.org/plugins/simply-static/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Scott at Code of Conduct](https://wordpress.org/support/users/codeofconduct/)
 * (@codeofconduct)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/responsive-images-with-srcset/#post-7045360)
 * Hi gjdenhertog,
 * Yes! Support for srcset is coming soon. I’m glad you’ve found a workaround in
   the interim!
 *  [Scott at Code of Conduct](https://wordpress.org/support/users/codeofconduct/)
 * (@codeofconduct)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/responsive-images-with-srcset/#post-7045492)
 * Hi gjdenhertog,
 * Version 1.2.3 (just released) includes support for the srcset attribute. Try 
   it out and let me know if you run into any issues.
 * Best,
    Scott
 *  Thread Starter [gjdenhertog](https://wordpress.org/support/users/gjdenhertog/)
 * (@gjdenhertog)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/responsive-images-with-srcset/#post-7045493)
 * Hi Scott,
 * It works like a charm, thanks for the quick solution!
 * Best,
    Joachim
 *  [jonathlee](https://wordpress.org/support/users/jonathlee/)
 * (@jonathlee)
 * [10 years ago](https://wordpress.org/support/topic/responsive-images-with-srcset/#post-7045503)
 * Hi Scott,
 * I tested out the responsive srcset and found that Simply Static only generate“
   Large” size image. Below is the example;
 * WordPress generated (all sizes down to small thumbnail size 300×300)
 *     ```
       <img class="alignnone wp-image-17 size-large" alt="ebay-1" width="840" height="840"
       src="http://localhost/wpstatic/wp-content/uploads/2016/05/ebay-1-1024x1024.jpg"
       srcset="http://localhost/wpstatic/wp-content/uploads/2016/05/ebay-1-1024x1024.jpg 1024w,
       http://localhost/wpstatic/wp-content/uploads/2016/05/ebay-1-300x300.jpg 300w,
       http://localhost/wpstatic/wp-content/uploads/2016/05/ebay-1-720x720.jpg 720w,
       http://localhost/wpstatic/wp-content/uploads/2016/05/ebay-1-1200x1200.jpg 1200w,
       http://localhost/wpstatic/wp-content/uploads/2016/05/ebay-1.jpg 1240w"
       sizes="(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px">
       ```
   
 * Simply Static Generated
 *     ```
       <img class="alignnone wp-image-17 size-large" alt="ebay-1" width="840" height="840"
       src="http://localhost/wpstatic/static/wp-content/uploads/2016/05/ebay-1-1024x1024.jpg"
       srcset="http://localhost/wpstatic/static/wp-content/uploads/2016/05/ebay-1.jpg"
       sizes="(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px">
       ```
   
 * Both were using same Default Twenty Sixteen theme on WordPress 4.5.2
 *  [Scott at Code of Conduct](https://wordpress.org/support/users/codeofconduct/)
 * (@codeofconduct)
 * [10 years ago](https://wordpress.org/support/topic/responsive-images-with-srcset/#post-7045504)
 * Hi jonathlee,
 * Thanks for reporting this issue. We’ll have it fixed with the next version of
   Simply Static, which will be released later this week.
 * Best,
    Scott

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Responsive images with srcset’ is closed to new replies.

 * ![](https://ps.w.org/simply-static/assets/icon-256x256.png?rev=2443263)
 * [Simply Static - The Static Site Generator](https://wordpress.org/plugins/simply-static/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simply-static/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simply-static/)
 * [Active Topics](https://wordpress.org/support/plugin/simply-static/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simply-static/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simply-static/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Scott at Code of Conduct](https://wordpress.org/support/users/codeofconduct/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/responsive-images-with-srcset/#post-7045504)
 * Status: resolved