0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Moved definition of default max image width to config (#12289)

no issue

- centralises definition of max width and allows customisation if needed
- allows for passing of the config value through to rendering libraries
This commit is contained in:
Kevin Ansfield 2020-10-19 08:56:18 +01:00 committed by GitHub
parent 143921948d
commit 3148d6a946
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -18,7 +18,7 @@ module.exports = function normalize(req, res, next) {
in: originalPath,
out,
ext: req.file.ext,
width: 2000
width: config.get('imageOptimization:defaultMaxWidth')
}, imageOptimizationOptions);
imageTransform.resizeFromPath(options)

View file

@ -77,6 +77,7 @@
}
},
"imageOptimization": {
"defaultMaxWidth": 2000,
"contentImageSizes": {
"w600": {"width": 600},
"w1000": {"width": 1000},