prevents non necessary resizes of images