Handling image resizing a bit better.