What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 150 Stack Exchange communities.

Is it possible to resize an image in an answer? For example, How important is PhD research topic to getting a job? has an answer that should have the image in the answer, but it's too big.

Is there a way to handle resizing?

share|improve this question

1 Answer 1

up vote 90 down vote accepted

Now that all image uploads are stored on imgur servers, you can tweak the URL to show various sizes should the original be too large.

Where the original might be something as obscene as this:


Slip your hand in with m or s before the file extension like so:





You can whack in good ol' HTML for that and force client-side resize:

<img src="http://example.com/path-to-ghosts.jpg" width="100" height="100">

But, it's up to you to work out what a good set of resize dimensions will be.

share|improve this answer
Note that for some reason this only works on SO if the src attribute comes first (before width and/or height). A while back it really puzzled me that I couldn't get the image working even though the url and everything seemed right... – Jonik Oct 10 '09 at 10:07
The order of src, width, height is the convention SOFU sticks to for the wild guns of HTML for images. – random Oct 10 '09 at 10:18
Note: The image title goes last. :) – Mr. Polywhirl Aug 22 '13 at 20:16
The image tag does not show when I add width or height. – Ciro Santilli 六四事件 法轮功 包卓轩 Nov 22 '14 at 8:54
@CiroSantilli You need to put the parameters in order: src, width, height. Ran into the same problem myself and didn't realize the fix until I found this question and followed random's comment. – Iszi Feb 27 at 17:14
@Iszi thanks for the tip, I'll try it out next time I edit an image. Their XSS filter is merciless! – Ciro Santilli 六四事件 法轮功 包卓轩 Feb 27 at 19:05
If you use the img tag approach, don't add px after the size! – mathematician yesterday

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .