Adding changes to image size logic