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

You must log in to answer this question.

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