0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-08 02:52:39 -05:00
ghost/core
Rishabh Garg 39485d17c0 Added new endpoint to upload square profile images with dimension validation (#9862)
refs #8576

- adds new API endpoint `/uploads/profile-image` for uploading profile images
- new validation which fails with error message if uploaded image is not square
- Renamed getImageSizeFromFilePath to getImageSizeFromStoragePath, because it's more explicit
- Add new getImageSizeFromPath method, which is used in the new dimensions middleware
- Ensure we use the sharp middleware to auto-resize the uploaded profile pictures
- Ensure the new route get's added to v2

While this makes sure all future profile images uploaded are square, this doesn’t affect any existing non-square profile image. Needs more thought on how to handle existing non-square profile images for the purpose of making theming easier in future.
2018-09-24 21:42:58 +02:00
..
client@0f7bf091f4 Updated Ghost-Admin to 2.1.3 2018-09-18 18:07:57 +05:30
server Added new endpoint to upload square profile images with dimension validation (#9862) 2018-09-24 21:42:58 +02:00
test Added new endpoint to upload square profile images with dimension validation (#9862) 2018-09-24 21:42:58 +02:00
index.js Changed where we trigger server start/stop announcement (#9815) 2018-08-22 13:28:31 +02:00