Retain ascpect ratio in resizeImageBase64

The docs say aspect ratio is constant when using targetWidth and targetHeight at the same time.