Title: Missing srcset support
Last modified: November 12, 2017

---

# Missing srcset support

 *  [strarsis](https://wordpress.org/support/users/strarsis/)
 * (@strarsis)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/missing-srcset-support/)
 * Currently the images are shown in their maximum available (original) size –
    
   resulting in very long download times and traffic. The correct srcset should 
   be used so the right thumbnail for the image is picked by browser.

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

 *  Plugin Author [dFactory](https://wordpress.org/support/users/dfactory/)
 * (@dfactory)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/missing-srcset-support/#post-9681149)
 * Hi,
    You mean images displayed in lightbox or a gallery?
 *  Thread Starter [strarsis](https://wordpress.org/support/users/strarsis/)
 * (@strarsis)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/missing-srcset-support/#post-9681233)
 * Hi,
 * I mean the image displayed in the lightbox. When you inspect the image you will
   notice that its src points to the original image – even when the screen viewport
   is much smaller. This results in extreme loading times.
 *  Plugin Author [dFactory](https://wordpress.org/support/users/dfactory/)
 * (@dfactory)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/missing-srcset-support/#post-9681253)
 * Not sure if srcset would work here – we’d need to check.
 * But you have an option to control image sized used in lightbox – under gallery
   image size RL setting.
 *  Thread Starter [strarsis](https://wordpress.org/support/users/strarsis/)
 * (@strarsis)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/missing-srcset-support/#post-9681496)
 * `srcset`/`sizes` would have the advantage that the browser can pick the right
   image file,
    depending on viewport and pixel density (hidpi/retina). `srcset`/`
   sizes` is well supported now by all browsers.
 * `srcset` is already provided by WordPress.
    The proper `sizes` attribute has 
   to be provided by the Lightbox markup generation so the browser knows the absolute
   image size in advance. E.g. when the image occupies the complete width of screen
   in the Lightbox, `sizes="100vw"` should be used.
 *  Plugin Author [dFactory](https://wordpress.org/support/users/dfactory/)
 * (@dfactory)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/missing-srcset-support/#post-9681692)
 * Well, correct me if I’m wrong, but srcset is an img tag attribute.
    While the
   image displayed in lightbox comes href attribute of a link.
 * So these two different things you just mixed in your question.
 *  Thread Starter [strarsis](https://wordpress.org/support/users/strarsis/)
 * (@strarsis)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/missing-srcset-support/#post-9682500)
 * [@dfactory](https://wordpress.org/support/users/dfactory/): Correct, the Lightbox
   script itself would have to use the `<img>` element then – the link to original
   image file can’t be used because it is only the image file of maximum size.
    
   But when the target image can always only point to its own image file anyway,
   using the `srcset`-attribute of original `<img>` element should be just fine 
   then?
    -  This reply was modified 8 years, 6 months ago by [strarsis](https://wordpress.org/support/users/strarsis/).
 *  Plugin Author [dFactory](https://wordpress.org/support/users/dfactory/)
 * (@dfactory)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/missing-srcset-support/#post-9682849)
 * Yea, but what would be lightbox effect for then?
    You see an image in original
   dimensions already. Doesn’t make much sense imo.
 *  Thread Starter [strarsis](https://wordpress.org/support/users/strarsis/)
 * (@strarsis)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/missing-srcset-support/#post-9683420)
 * [@dfactory](https://wordpress.org/support/users/dfactory/): When the dimensions
   of the image are changed to viewport size (enlarged to screen in lightbox) and
   the `sizes`-attribute is adjusted, the browser will automatically download the
   right image file that fits to screen and pixel density. The original `<img srcset
   ="...">` can be used for this as WordPress already inserted all the generated
   thumbnails of different size the browser can choose from.

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

The topic ‘Missing srcset support’ is closed to new replies.

 * ![](https://ps.w.org/responsive-lightbox/assets/icon-256x256.png?rev=3460874)
 * [Responsive Lightbox & Gallery](https://wordpress.org/plugins/responsive-lightbox/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/responsive-lightbox/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/responsive-lightbox/)
 * [Active Topics](https://wordpress.org/support/plugin/responsive-lightbox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/responsive-lightbox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/responsive-lightbox/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [strarsis](https://wordpress.org/support/users/strarsis/)
 * Last activity: [8 years, 6 months ago](https://wordpress.org/support/topic/missing-srcset-support/#post-9683420)
 * Status: not resolved