[Resolved] Prevent WP to add width/height to img-tags
When I add a post thumbnail to a post or page, I can choose the size at which it should be displayed (Thumbnail, Medium, Large, Original). WordPress then adds width=”xyz” height=”abc” to the HTML output.
In my case however, I do NOT want WordPress to set a specific size and add width/height parameters to the HTML, because I set max-width values via CSS (media queries). While the thumbnail’s width is higher then the max-width CSS value (which is intended), it results in a vertically stretched image, because WordPress adds width/height to the <img /> tag.
So if I could find a way to prevent WordPress to add width/height parameters on post thumbnails, I could scale these images proportional via CSS, without any distortion.
- The topic ‘[Resolved] Prevent WP to add width/height to img-tags’ is closed to new replies.