Skip to content

Commit

Permalink
Fix image resizing, closes #321
Browse files Browse the repository at this point in the history
  • Loading branch information
SmallhillCZ committed Nov 3, 2020
1 parent 7d7a500 commit 11b3938
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/controllers/albums/photo-resize.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = async function (file, sizes, options) {
// generate smaller versions of the file
var sizesMetadata = [];
for (let size of sizes) {
const meta = await sharp(file).rotate().resize(size.width, size.height, { fit: "contain" }).withMetadata().toFile(size.path);
const meta = await sharp(file).rotate().resize(size.width, size.height, { fit: "inside" }).withMetadata().toFile(size.path);
sizesMetadata.push(meta);
};

Expand Down

0 comments on commit 11b3938

Please sign in to comment.