MaxImageSize isn't invoked when hashes are in URL?

conigsconigs New
edited February 2011 in Vanilla 2.0 - 2.8
I have an install of 2.0.17.8 upgraded from 2.0.16. I installed MaxImageSize to keep inline images in check. It seems to work fine, as long as there's no hash at the end of the URL (ex discussion/13/logo-critique#Item_26). If there is, it seems like the JS call isn't fired.

Comments

  • Verified that this is the case in my install of 2.0.17.8 too... Looking at the source now (it's small so I may be able to provide a fix).
  • OK, it looks like if you change the first line of maximages.js from this:

    $(document).ready(function() {

    to this:

    $(window).load(function() {

    then the problem should be fixed. :)

    You may also want to include a rule like this in your theme:

    #Content img { max-width: 659px; /* where 659 is the maximum image width */ }
  • edited March 2011
    Thanks, I added this recipe to http://www.vanilla-wiki.info
  • This worked great! Thanks!
Sign In or Register to comment.