Bugfix image resizer

PS: the comments are explanations about what I've done. This is my first PR, so I dont knew how that works
Why do we need to restrict this to webkit?