0

I recently changed my theme to completely new one (fresh), and all my post images suddenly started to break my layout.

When I inspect code all images and loaded content that are wrapped in 'figure' have inlined width which is too wide for my content.

Why this had happened?

And what would be the correct way of fixing it? At first I thought that something wrong went with $content_width setting in functions php, but as it is clear it does not affect old content.

Any ideas of 'correct' fix?

2
  • There's no way to answer this question, there's no code, and the only thing I can think of is that it's a styling issue ( which would be off topic here as are all purely CSS questions )
    – Tom J Nowell
    Commented Feb 12, 2015 at 22:35
  • I don't think this is the solution. It sounds more like hackery... i bet its possible to regenerate uploads or refresh settings somehow. Commented Feb 12, 2015 at 22:45

1 Answer 1

0

You would need to regenerate your thumbnails, to fit the new theme settings appropriately. The images, when uploaded previously while using the old theme, were sized specifically to that theme, then when you changed themes, which may have a different size that it uses for those same placements, has not had the chance to run their sizing functions appropriately and accordingly.

There are a few plugins that can handle the regeneration of images, which will basically resize all your images according to the 'new' settings of the theme or plugins that are using image sizing functions.

Couple Reference Points: http://codex.wordpress.org/Function_Reference/add_image_size

and a plugin reference: https://wordpress.org/plugins/regenerate-thumbnails/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.