Added an image resizer function with support for retina images