What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 142 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 62 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:

http://i.stack.imgur.com/R7QBb.jpg

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

Medium:

http://i.stack.imgur.com/R7QBbm.jpg

Smaller:

http://i.stack.imgur.com/R7QBbs.jpg

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
    
oh. duh. facepalm! –  warren Oct 8 '09 at 6:51
2  
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
3  
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

You must log in to answer this question.

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