Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Set Maximum Image Size

RonRon New
edited July 2010 in Vanilla 2.0 - 2.8
How do I set the maximum image size in a new discussion? I am using jQuery WYSIWYG as my editor. I don't want large images to break my theme. Can images be set automatically re size.

Comments

  • Options
    not so great, but a solution:

    http://pastebin.com/2GhWATSq

    add this to the js/global.js, before the });
  • Options
    that works but when I goto the page the image is regular size. then I need to refresh the page to have it shrink. thanks for your help though
  • Options
    well, here is the updated version, it works without refresh.

    http://pastebin.com/aGwHUUc0
  • Options
    hmm odd. it's doing the same thing. when i go directory to the post the image is full size and breaks the theme. when i refresh it shrinks it.
  • Options
    Its work for me.
    What browser did you use?
    Maybe you can share a link?
  • Options
    I use FireFox. The link may be too sensitive for this forum.
  • Options
    I check in Firefox too, and its working for me:(
  • Options
    Can you show me exactly what it looks like in your global js?
  • Options
    passatgtpassatgt New
    edited July 2010
    function imageResize() { $('img').load(function() { $('.Message p img').each(function() { var width = $(this).width(); var url = $(this).attr('src'); if (width >655) { $(this).attr('width','655'); $(this).after('<br/><a href="'+url+'" target="_blank">Teljes méret</b>'); } }); }); } imageResize(); //When you make a comment, the page not going to refresh, only the message list, so you need to run the function again. $('ul.MessageList').ajaxComplete(function() { imageResize(); });
  • Options
    Yea same as me. I am using jQuery WYSIWYG what's the chances of this conflicting with it?
  • Options
    well, try it out:)
  • Options
    Disabled all plugins and still had same issue. Oh well, I'll look elsewhere. Thank you.
Sign In or Register to comment.