g.drawImage(scaledImage, 0, 0, null);
g.dispose();
- ImageIO.write(bufferedImage, "jpg", out);
+ ImageIO.write(bufferedImage, "webp", out);
out.close();
}
* relative to designated thumbnails directory within parent directory.
*/
public String getRelativeThumbnailFileName(final Dimension targetDimension) {
- String thumbnailExtension = "gif".equalsIgnoreCase(getFileExtension()) ? "gif" : "jpeg";
+ String thumbnailExtension = "gif".equalsIgnoreCase(getFileExtension()) ? "gif" : "webp";
return FilePathParser.getFileNameWithoutExtension(fileName) + " ("
+ computeThumbnailHash(targetDimension) + ")." + thumbnailExtension;