Hi there. Hope someone can help. All of a sudden my featured image at the top of a post has gone massive and I want to resize it. It’s driving me a bit mad. It should be such an easy thing to do but it’s not.
So far I have something like this, which does resize it but I know want to center it now as it is left aligned. I hear you can also do something with post_image_thumbnail or something like that.
If someone can help / point in the right direction. Here is a link (no changes made on this)
WordPress has added height and width attributes to the image which will override your rules. You would need to remove the attributes with JavaScript or with a hook in the theme or your CSS will take second fiddle to the inline definitions.
But…it is much better to load a smaller image in the first place. The theme is probably loading the image with the_post_thumbnail() which has a parameter that specifies the size to use.