Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Allow Image plugin question


fel64
Member

@fel64

It is probably possible; you would have to fopen the image in binary mode, read its width and if that’s too big delete/replace it I think. Quite complicated and very server-intensive.

The superior solution, in my opinion, is to open your theme’s style.css, look for the #thread li entry and add to it:

overflow: auto;

That will then add scrollbars to each post if the width of an image exceeds its specified dimensions (for example, if you explicitly set the width of it (or one of its parent elements) (probably done in your theme already) but not the height, the image would stretch the post to the desired height but add scrollbars to the width).

Alternatively you could add this to the end of your style.css file:

#thread li img {
max-width: 600px;
}

Or whatever width you want. This does not work so well; the image will load at full resolution, breaking the layout, and then be resized. It is also only supported by newer browsers; IE 6 will not recognise it.

Skip to toolbar