only resize images if we are in the frontend