Ghost/core/server/web/middleware
Nazar Gargol 0faf89b5ab Added ability to resize and compress images on upload (#9837)
refs #4453

* On by default

* Added config to disable resizing

* Added basic image optimization processing

* Added dep: sharp (optional dep)

* Added resize middleware

* Take care of rotation based on EXIF information

* Removed all meta data from optimised image

* Added handling if sharp could not get installed

* Do not read ext twice - optimisation

* Do not call sharp if config is disabled

* Do not remove the original image which was uploaded (store 2 images)

* Support of `req.files` for internal logic

* Disabled cache to enable file removal on Windows
2018-08-30 17:30:36 +01:00
..
api Extended ghost version utility (#9278) 2018-01-03 20:20:18 +01:00
image Added ability to resize and compress images on upload (#9837) 2018-08-30 17:30:36 +01:00
validation Added ability to resize and compress images on upload (#9837) 2018-08-30 17:30:36 +01:00
admin-redirects.js Moved utils/url.js to UrlService 2017-12-11 20:05:33 +01:00
brute.js Moved apps into web folder (#9308) 2017-12-06 17:37:54 +01:00
cache-control.js Moved apps into web folder (#9308) 2017-12-06 17:37:54 +01:00
custom-redirects.js Updated docs links 2018-08-16 12:13:24 +02:00
error-handler.js Changed comments and deprecation notes 2018-08-16 12:13:24 +02:00
frontend-client.js Moved labs, auth, permissions, settings, mail, themes to services (#9339) 2017-12-14 03:01:23 +01:00
ghost-locals.js Moved ghost-version to lib 2017-12-14 22:14:55 +01:00
index.js Dynamic Routing Beta (#9596) 2018-06-05 19:02:20 +02:00
labs.js Moved labs, auth, permissions, settings, mail, themes to services (#9339) 2017-12-14 03:01:23 +01:00
log-request.js Import lib/common only 2017-12-12 10:28:13 +01:00
maintenance.js Dynamic Routing Beta (#9596) 2018-06-05 19:02:20 +02:00
pretty-urls.js Moved apps into web folder (#9308) 2017-12-06 17:37:54 +01:00
serve-favicon.js Moved image utils to lib/image 2017-12-14 20:46:53 +01:00
serve-public-file.js Always require fs-extra - consistency change 2017-12-13 20:57:11 +01:00
static-theme.js Moved utils constants to lib/constants 2017-12-14 14:13:40 +01:00
uncapitalise.js Moved removeOpenRedirectFromUrl to local web utils 2017-12-13 22:06:31 +01:00
url-redirects.js 🐛 Fixed infinite redirect when subdirectory equals top level domain (#9621) 2018-05-28 12:18:34 +02:00