0

I have added 10 image sizes:

add_image_size( '1920', 1920, 384, false );
add_image_size( '1600', 1600, 320, false );
add_image_size( '1536', 1536, 307, false );
add_image_size( '1440', 1440, 288, false );
add_image_size( '1336', 1336, 267, false );
add_image_size( '1280', 1280, 256, false );
add_image_size( '1024', 1024, 205, false );


add_image_size( '962', 962, 240, false );
add_image_size( '834', 834, 208, false );
add_image_size( '768', 768, 192, false );
add_image_size( '600', 600, 150, false );


add_image_size( '412', 412, 137, false );
add_image_size( '360', 360, 120, false );
add_image_size( '320', 320, 107, false );

(first pack for computers, then tablets then phones)

and I still have default wordpress image sizes and whatever this theme added too.

Im talking about all wordpress images but mainly have my header image in mind.

Original is cut in GIMP to 1920x600 and I upload it as my header. Then i set it in css to be about 100vw and 20vh.

and i have all these image sizes (about 20+ in total i guess) generated but heres what is in source code:

<img class="img-responsive singleHeaderImage wp-post-image" alt="" 
src="http://xxxxx.tk/wp-content/uploads/huge_moon_2-wallpaper-2048x1536-2.jpg" 
width="2048" height="1536">

This is my code for producing this image:

    <?php the_post_thumbnail('full',  array( 'class' => 'img-responsive singleHeaderImage' )); ?>

Any tips guys? I have 2 more blogs that do generate srcset at least in one place (post loop archive/homepage) but ive been unable to reproduce it

MUCH THANKS

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.