0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00
ghost/core/test/utils/fixtures/images
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
..
favicon.ico Favicon URI (#7700) 2017-01-26 18:01:19 +00:00
favicon.png
favicon_16x_single.ico
favicon_64x_single.ico 🎨 Blog icon improvements (#8260) 2017-04-11 13:40:17 +02:00
favicon_multi_sizes.ico 🎨 Blog icon improvements (#8260) 2017-04-11 13:40:17 +02:00
favicon_not_square.png
favicon_size_too_large.png
favicon_too_large.png
favicon_too_small.png
ghost-logo.png
ghost-logo.pngx
ghosticon.jpg
loadingcat.gif
loadingcat_square.gif Added new endpoint to upload square profile images with dimension validation (#9862) 2018-09-24 21:42:58 +02:00
myicon.ico 🐛 Blog icon improvements (#8298) 2017-04-10 12:04:46 +01:00