Skip to:
Content
Pages
Categories
Search
Top
Bottom

Limit width of images in ALLOW IMAGES plugin?


  • Marius-
    Member

    @marius-

    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)
  • Try CSS instead :) Set the max-width for post.img to what you want, and possible make it overflow: hidden as well.


    Shagalaga
    Member

    @shagalaga


    Marius-
    Member

    @marius-

    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

    @marius-

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

    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

    @marius-

    Where do I place this?

    In your theme’s style.css file.


    jamesb4551
    Member

    @jamesb4551

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


    Marius-
    Member

    @marius-

    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;

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

    Moar Coffee, Less Meetings, Plz.

    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

    :-|

    @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 :)

    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.