diff --git a/src/main/java/com/jeju/nanaland/global/image_upload/S3ImageService.java b/src/main/java/com/jeju/nanaland/global/image_upload/S3ImageService.java index 3d081858..7e6f1775 100644 --- a/src/main/java/com/jeju/nanaland/global/image_upload/S3ImageService.java +++ b/src/main/java/com/jeju/nanaland/global/image_upload/S3ImageService.java @@ -228,7 +228,10 @@ private int getResizeImageHeight(MultipartFile file) throws IOException { int originalHeight = bufferedImage.getHeight(); int originalWidth = bufferedImage.getWidth(); int aspectRatio = originalHeight / originalWidth; - - return 600 * aspectRatio; + if (aspectRatio == 0) { + return 450; + } else { + return 600 * aspectRatio; + } } }