How Get rid of srcset on a image size and force the size on all screen?
I recently figured out a huge problem for images on my site.
I recently disabled all the WordPress image sizes (thumbnail, large, medium-large) except for the medium size. Now I only have medium and my original image.
WordPress shows responsive images. So, WP shows the large or medium-large image on mobile even though I get
the_post_thumbnail('medium);. It is even the same for size images inside the post-editor. But currently, WP shows my original big image for responsiveness as I only have the original image beside the medium 300px image.
It’s obvious that nobody wants an image size to increase after selecting a smaller version. WP behaves opposite in that way. If you select medium, it outputs the medium-large or large for all mobile or tablet screens.
Adjusting higher sizes to lower is one of the best features, but showing the higher image even after selecting small is the problem.
I now want to disable responsiveness when calling the medium size image.
Currently, I’m not sure if I should disable srcset sitewide.