fixed bug in scaling

scaling to max of images was performing on the css of the image rather
then its attributes