Title: implementing responsive images
Last modified: August 24, 2016

---

# implementing responsive images

 *  [Siempie](https://wordpress.org/support/users/siempie/)
 * (@siempie)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/implementing-responsive-images/)
 * Hi Jordy,
 * Nice plugin. I few basic questions:
 * I have responsive website (bootstrap based). I currently use retina.js
    After
   discovering the srcset attribute I would like to start using your plugin in the
   future with PictureFill.
 * 1. My custom media sizes only have a max. width – not a max. height. Files will
   have variable names (e.g: file1-100×105.jpg, file2-100-109.jpg, file3-100×78.
   jpg, etcetera). Is that a problem for your plugin?
 * 2. Since the pages are responsive I need different media-sizes per image. My 
   idea was to generate all the different media sizes with your plugin.
    Then the
   plugin would list every generated media size for an image in the srcset and the
   browser would decide which image to pick.
 * `<img srcset="/wp-content/uploads/image-100x100.jpg 100w, /wp-content/uploads/
   100x100@2x.jpg 200w, /wp-content/uploads/image-150x150.jpg 150w, /wp-content/
   uploads/image-150x150@2x.jpg 300w" alt=“something“>`
 * Would something like above be possible, or does the plugin only support this:
 * `<img srcset="/wp-content/uploads/image-150x150.jpg 1x, /wp-content/uploads/150x150@2x.
   jpg 2x" alt=“something“>`
 * Thanks for helping,
 * cheers,
 * Simon
 * [https://wordpress.org/plugins/wp-retina-2x/](https://wordpress.org/plugins/wp-retina-2x/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/implementing-responsive-images/#post-6043783)
 * Hello Siempie,
 * The plugin generates images based on the image sizes and the HTML is re-written
   when sent to the browsers, transforming the normal img src into src-set including
   the retina images if they are found.
 * However, if you already have the srcset in your code, it wouldn’t do anything.
 * If you are using only a src, then generating this for many image sizes is really
   tricky and a complicated UI would have to be made (plus probably a new table 
   in the database to handle all this). It wouldn’t be a light plugin anymore.
 * Like you said, the plugin only supports the 1x / 2x right now. I thought about
   supporting more but (surprisingly) nobody asked for it (you are the first :p)
   and the plugin would become way more complex.
 * If you have a good idea or solution I would really love to hear. I have to say,
   every time I thought about it only very complicated solutions came out. The only
   real solution I had to that is to override the Insert Media modal window that
   could let you pick the right images and their sizes then generates the srcset
   for you. And that’s not really about “Retina”…

Viewing 1 replies (of 1 total)

The topic ‘implementing responsive images’ is closed to new replies.

 * ![](https://ps.w.org/wp-retina-2x/assets/icon-256x256.png?rev=2597316)
 * [Perfect Images: Regenerate Thumbnails, Image Sizes, WebP & AVIF](https://wordpress.org/plugins/wp-retina-2x/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-retina-2x/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-retina-2x/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-retina-2x/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-retina-2x/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-retina-2x/reviews/)

## Tags

 * [srcset](https://wordpress.org/support/topic-tag/srcset/)

 * 1 reply
 * 2 participants
 * Last reply from: [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/implementing-responsive-images/#post-6043783)
 * Status: not a support question