0

I'm about to reboot an old blog of mine and therefor I'm creating a new theme from scratch. Before I'd align pictures left and right, because it seemed good. But now I want to make it much cleaner and have all images centered using a fairly large size so users don't have to click to view.

Ususally I'd wirte a custom filter that looks for the urls, finds the attachment according to the url, then gets the new size and replaces it. But I'm wondering if there is a tool, plugin or some other way to do this on the database.

What's the most clean way to alter all the images everywhere?

Update: Please note that I want to change the actual image size and not just the CSS style. This is because all the old posts contain small thumbnails which cannot be blown up to fit the with of the container. So I need to swap the thumbnail URL for a medium size one.

Thank you for your time!

Sorry for any spelling or grammar mistakes, I'm not a native speaker.

2
  • Did you always use the same image size when you inserted the images into the posts from your image library (medium, large, etc...)?
    – Stephen S.
    Apr 20, 2015 at 23:51
  • Not really. And since Wordpress has this really bad naming convention with dimensions instead of size-names this task becomes even harder, because not all images have the same aspect ratio. So there is no way in predicting image URLs. They all have to be looked up.
    – user13716
    Apr 20, 2015 at 23:53

1 Answer 1

0

i think the best way to alter images is through css. you add a class to all your pictures that would set its size into your custom size. I think bootstrap has that feature

1
  • 1
    Sorry if that was not clear: I'm talking about changing the actual image size as I want neither super small thumbnails nor super large originals. So I need a way to replace the urls. But thank you for your reply, I will update the question.
    – user13716
    Apr 20, 2015 at 22:50

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.