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.

Inserting images don't resize in Chrome.

edited January 2011 in Vanilla 2.0 - 2.8
When i'm insert image after uploading it doesn't resize in Google Chrome browser.


  • Options
    Same in Safari, which is understandable because they use the same engine.
  • Options
    oliverraduneroliverraduner Contributing to Vanilla since 2010 Switzerland ✭✭
    same problem here
  • Options
    + 1
  • Options
    same problem !
  • Options
    The problem is that webkit browser can't give you the image size before they're fully loaded (so it returns 0 for width & height)

    A quick ugly fix :

    in js/global.js, line 379 (inside $('div.Message img').livequery(function() {) :


    if (img.width() > container.width()) {


    if (img.width() > container.width() || img.width() == 0) {

    The downside is that, instead of not resizing too large pictures, it will resize pictures smaller than the container (when they are not cached yet). That might be a problem on your board (on mine it's not a big issue :p)
Sign In or Register to comment.