21

I've recently installed WP Retina 2x, and it generates the @2x images on my server. However, when using the PictureFill or WordPress Responsive methods, the srcset does not include any @2x images or 2x declarations:

retina @2x images not included in srcset

I should also mention that my media is stored on Amazon S3 using the S3 Offload Lite plugin. While the generated @2x images are getting uploaded to S3, the retina plugin is unable to detect them, even using the pro version's "Over HTTP Check" feature.

Does anyone know why that is, or how to fix it?

mujuonly
  • 11,370
  • 5
  • 45
  • 75
Avishai
  • 4,512
  • 4
  • 41
  • 67
  • Please check and paste "Display Error Log" under Dashboard so we can get clear picture what's happening – Mason.Chase Jun 17 '17 at 20:29
  • 2
    I'm not completely sure how WP Retina 2x works, but I assume that it registers a couple of new image sizes that are compatible with retina displays. When a new image size is Registered in WordPress, it does *not* generate the images immediately, it only generates the images when the image is uploaded. To force your images to re-generate (including the retina-sized images), I usually install and run [this plugin][1]. [1]: https://wordpress.org/plugins/regenerate-thumbnails/ – Alex Standiford Feb 27 '18 at 13:41
  • Is this topic still active? Have you tried updating your wordpress and regenerating thumbnails again? maybe it won't call because the images don't exist in the generated database yet – Kelvin Mariano Oct 26 '19 at 19:13

1 Answers1

1

@2x code in srcset does not needs anymore in WordPress.

How works srcset attribute now in WordPress: browsers deciding what image resolution to load from array (srcset attribute) using sizes attribute and screen ppi (screen density).

So, everything what you need - it's to setup correct sizes attribute. And you don't need any plugin which makes @2... wordpress and woocommerce support srcset and sizes attributes.

Example from real site on woocommerce: iphone 7/8 has 2x device pixel ration, but iphone X has 3x device pixel ration - for each device loads images with different resolution enter image description here

Ivan Frolov
  • 396
  • 2
  • 7