How setup sizes correctly?
-
Hello
I’m a bit confused in how to setup the sizes correctly.
I have the following setup:
$rwp_attributes = array( 'sizes' => array( 'featured-small-image', 'featured-small-image@2x', 'featured-image', 'featured-image@2x' ), 'media_queries' => array( 'featured-small-image' => 'min-width: 350px', 'featured-image' => 'min-width: 600px' ), 'retina' => true, 'attributes' => array( 'img' => array( 'class' => 'lazyload img-responsive' ), 'ignored_image_formats' => array( 'gif' ) ) );
This is the result:
<picture ><!--[if IE 9]><video style="display: none;"><![endif]--><source data-srcset="/wp-content/uploads/2015/06/P_0909_titelbild-700x350.jpg, /wp-content/uploads/2015/06/P_0909_titelbild-1400x700.jpg 2x" media="(min-width: 600px)"><!--[if IE 9]></video><![endif]--><img data-srcset="/wp-content/uploads/2015/06/P_0909_titelbild-350x175.jpg, /wp-content/uploads/2015/06/P_0909_titelbild-700x350.jpg 2x" class="lazyload img-responsive"></picture>
The area where the image is showed is 700px wide. As soon I’m on a retina screen with a with of 568px, the image is not scaled to the full with.
You can check here, the second device: https://www.responsinator.com/?url=www.schnieperarchitekten.ch%2Fprojekte%2Fneubau-haus-sunnerain-in-hertenstein-bei-weggis%2FI just can’t figure out why on retina screen 568px with the 1400px image is not loaded.
Thanks for any help!
Cheers
Aldo
- The topic ‘How setup sizes correctly?’ is closed to new replies.