Users can currently upload images through the CampaignController and EventController via the IImageService. The implementation is here: https://github.com/HTBox/allReady/blob/a0084d88cf5cbc1a14c7df0ec8c43119beff3ecc/AllReadyApp/Web-App/AllReady/Services/ImageService.cs
We need a function that will resize any images that are over a pre-defined maximum dimension.
This function should be triggered from a blob upload. The method would take the image and, if it's larger than the allowed maximum in either dimension, resize the image to the maximum dimension while preserving the aspect ratio.
There should be a setting called maxDimension that is the constraint used to resize the image that can be set from local.settings.json (and ultimately in the Azure Functions deployment).
Users can currently upload images through the
CampaignControllerandEventControllervia theIImageService. The implementation is here: https://github.com/HTBox/allReady/blob/a0084d88cf5cbc1a14c7df0ec8c43119beff3ecc/AllReadyApp/Web-App/AllReady/Services/ImageService.csWe need a function that will resize any images that are over a pre-defined maximum dimension.
This function should be triggered from a blob upload. The method would take the image and, if it's larger than the allowed maximum in either dimension, resize the image to the maximum dimension while preserving the aspect ratio.
There should be a setting called
maxDimensionthat is the constraint used to resize the image that can be set fromlocal.settings.json(and ultimately in the Azure Functions deployment).