user291701
user291701

Reputation: 39681

<img> is blurry when viewed in tumblr post, otherwise looks crisp?

I'm using tumblr. I've inserted an image, html looks like:

<img height="320" src="foo.png" width="400" />

My image really is that exact size, width(400), height(320). It has text in it, and looks crisp if I visit the url of the image directly (or locally on my machine).

In the tumblr post however, the image is quite blurry. It is indeed 400 pixels wide in screen pixels, but looks like there's some weird compression being applied possibly through some css attribute on the tag that I'm not aware of?

Anything I can check to see what's going on?

Thanks

Upvotes: 0

Views: 5252

Answers (2)

mildog8
mildog8

Reputation: 2154

try giving the image a height with css for example

<img style="width: 400px; height: 320px;" src="foo.png" />

or dont even use an img tag use a div for example

<div style="background: url(foo.png); width: 400px; height: 320px;"></div>

Upvotes: 0

dku.rajkumar
dku.rajkumar

Reputation: 18568

I am not exactly sure whats the problem but you can try putting the img inside a div and fix the size of div using style instead of img. something like

<div style="height:320px;width:400px;">
  <img src="foo.png" />
</div>

Upvotes: 0

Related Questions