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
This is an example of incorrect tabbing that probably your code editor is changing - it's a style issues so the tests don't pick it up.