Fix image thumbnail resizing