squashed images

Pictures on my Tumblr appear all vertically stretched! What do:

So, you make text posts with embedded images to the body and for some annoying reason the images always appear to look horizontally squished (or vertically stretched if you prefer) to fit the width of your layout! It ruins the looks of your posts as well as the content itself! How do you fix this? Turns out it’s ridiculously simple!

Go to your Tumblr Customize page, (you should see it as a button in the upper-right corner of your blog page itself,) and click the “Edit HTML” button.

Now, you should see a huge mess of code. Don’t worry about all of this too much, we’re going to be dealing with 99.98% none of it.

What we’re going to be doing is either adding or editing one parameter of your theme’s CSS section to tell images to automatically resize their vertical dimension based on the width of their container. Thus, maintaining a constrained aspect ratio.

First thing is first, we need to check whether your layout already has the CSS entry. Within the first ¼ of your theme’s coding, there should be a line that has the tag <style type=“text/css”>. This is the start of your CSS. The CSS ends when you find a line further down that contains </style>. Take a quick look through this section to see whether or not it contains an entry called “img” – if it does it would likely be near the beginning.

If this “img” entry already exists, we’re going to add one simple piece of code to it. Within the { } brackets following “img”, add this code (in bold) just before the closing } backet: height:auto;

If this “img” entry does not exist, we’re going to add it by making a new line between any other two entries in the CSS section. Copy and paste the following code (in bold) into that line: img {height:auto;}

*Note about the following bit: My theme thinks it’s being clever by substituting traditional greater-than / lesser-than symbols used for HTML tags with left and right arrows. Please disregard this and read them as normal greater-than/lesser-than symbols. Copying and pasting the code text will still work fine in your theme.*

If for some reason your theme HTML does NOT contain a <style> CSS section at all, we can simply create one. Search the first 1/3 of your theme’s code for the line with </head> in it. This is the end of your <head> section, and where your CSS parameters should be. So, just above the </head> line, add the following code (in bold):

<style type=“text/css”>
img {height:auto;}

Hit preview, then save! You’re all set.

So with this simple code fix, your posts can go from looking like this:

to this:


1st image: 

butternut squash, carrot and courgette spirals with Spinage, chia seeds, vegi deli sausages in mixed herb oil, 

2nd image: 

First time using my blend active smile emoticon

Ingredients are 1 granny smith apple, spinach and pineapple.