Skip to:
Content
Pages
Categories
Search
Top
Bottom

Limit width of images in ALLOW IMAGES plugin?

  • @marius-

    Member

    Can I do this?

    Theres nothing stopping a user in posting a huge image that exceeds the post-width. Is there some way I can have this plugin resize the images?

Viewing 13 replies - 1 through 13 (of 13 total)
  • @ipstenu

    Moderator

    Try CSS instead :) Set the max-width for post.img to what you want, and possible make it overflow: hidden as well.

    @shagalaga

    Member

    @marius-

    Member

    Shagalaga, that was just what I was looking for, but it doesnt work. Nothing happens. See here: http://www.michaeljackson.no/forum/topic.php?id=1&replies=7#post-10

    @marius-

    Member

    This is my ongoing problem now. The plugin simply does not work for me. I’ve solved the other problems, but this….

    @ipstenu

    Moderator

    Did you try it with CSS? You shouldn’t need a plugin with this.

    This should cover it, it’s what I’m using and I’ve had no more page borking:

    post.img { width: 600px; overflow: hidden; cursor: pointer; }

    You may need to adjust width as needed.

    @marius-

    Member

    Where do I place this?

    @ipstenu

    Moderator

    In your theme’s style.css file.

    @jamesb4551

    Member

    Yeah that plugin don’t work, but Ipstenu is right on the money there, did it this morning and works a treat.

    @marius-

    Member

    Is it then possible to click the image, and enlarge it? or is it just plain and simply resized with no other options?

    I read somewhere that if a user posts a small image, this will be enlarged to that size, when using CSS, is this true?

    edit:

    Ipstenu, I tried your CSS code, and that did not work either. But this did:

    #thread .post img {max-width:580px;

    @ipstenu

    Moderator

    Doy! Max-Width is correct, and it will NOT resize your images and make them larger :)

    Moar Coffee, Less Meetings, Plz.

    @kirpiit

    Member

    My theme is a very slightly edited Kakumei.

    The very last lines in style.css read

    #thread .post img {

    max-width: 100%;

    }

    Yet posted images do not resize as they are expected to.

    Please see http://www.kirpi.it/r/topic/limit-width-of-images as an example.

    What could it be, please?

    Puzzled

    :-|

    @kawauso

    Member

    @kirpi.it Try .post img { max-width: 100%; overflow: hidden; }, probably the missing overflow: hidden bit

    Yay for finding this thread though, so much cleaner than the JS solution I was using :)

    @kirpiit

    Member

    It works!

    :-)

    Thank you!

    By the way, the “This topic is resolved” sentence at the top of this thread should be reversible. I could not find a way to “reopen” it though.

Viewing 13 replies - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.
Skip to toolbar