It may be a very simple question due to less understanding of the procedure, but what I think is NO question is less important .
In WordPress, we have 4 default sizes:
- Original (as elsewhere) - no cropping
- Large - usually 1024 times; 1024
- Medium - usually 300 times; 300
- A sketch is usually 150 and times; 150 - hard edge.
And we can edit / deactivate all sizes by default, except for the original, and we can add / edit / delete any custom sizes, you can even enable 2x support using custom scripts for widescreen devices. But where my understanding ceased - we have our desired images with their sizes, what now? How can we show / deliver them according to view sizes?
Suppose I have a section where the code is located:
<article class="news">
<?php the_post_thumbnail( 'thumbnail', array( 'class' => 'alignleft' ) ); ?>
<div class="entry-excerpt"><?php the_excerpt(); ?></div>
</article>
If I need to throw away a 2x (wider) version of the image (instead of a thumbnail), how can I do this?
, PHP JavaScripts, JS - . , JS, ? , .