adding scale method for images bigger than 400px