diff --git a/cloud-common-plugin/src/main/java/com/cm/common/plugin/service/file/impl/FileServiceImpl.java b/cloud-common-plugin/src/main/java/com/cm/common/plugin/service/file/impl/FileServiceImpl.java index c4824ff..032d3a7 100644 --- a/cloud-common-plugin/src/main/java/com/cm/common/plugin/service/file/impl/FileServiceImpl.java +++ b/cloud-common-plugin/src/main/java/com/cm/common/plugin/service/file/impl/FileServiceImpl.java @@ -635,12 +635,15 @@ public class FileServiceImpl extends AbstractService implements IFileService { } /** - * 是否是图片文件 + * 是否是图片文件, GIF图片不压缩 * * @param fileType * @return */ private boolean isImageFile(String fileType) { + if (StringUtils.equalsIgnoreCase("gif", fileType)) { + return false; + } String imageTypes = fileProperties.getImageTypes(); for (String imageType : imageTypes.split(",")) { if (StringUtils.equalsIgnoreCase(fileType, imageType)) {