WordPress not choosing the right image from srcset
WordPress not choosing the right image from srcset
WordPress not choosing the right image from srcset
It’s css problem apply some css to it, you can do the following when the browser window is smaller than 800px it will hide the overflow of that div, you can simply apply it without media query as well. add this in your style.css @media only screen and (max-width: 800px) { div#box { overflow: hidden; … Read more
Hmm, I figured it out. I changed the thumbnail AND removed the needed class img-responsive to apply responsive dimensions. Once I kept those all was fine. –
Show a page of non-standard-sized featured images
How can I disable Jetpack plugin on mobile?
Your question is off-topic on here, but some quick tips. To print your style, you can use wp_add_inline_style(). find a stylesheet and hook to it to print your styles, instead of using style link in a script link (which obviously won’t work). This is an example for you, which goes in your theme/child-theme’s functions.php file: … Read more
The ‘picture’ element supports min-width and max-width. If the image is a featured image then wp_get_attachment_image_src is what you would use: // open the picture element <picture> // use this image if the width of a screen does not go over 599px <source srcset=”https://wordpress.stackexchange.com/https://wordpress.stackexchange.com/https://wordpress.stackexchange.com/<?php echo wp_get_attachment_image_src( get_post_thumbnail_id(), ‘whatever add_image_size you want to use’, false )[0] … Read more
I found the error. It is the inspect tool of Google Chrome that is broken. When viewing the device toolbar and checking on different screen size it doesn’t work. It only works when you manually resize the window without the device toolbar activated.
Adding this code below has fixed the issue .woocommerce-billing-fields__field- wrapper:after { clear: both; display: table; content: ”; } Thanks
Yes as the comment suggests you need to add max-width:100%; height:auto; to your img’s , you are not containing the image inside the div so there is nothing to tell srcset to use the smaller version.