mazi-project / guestbook

This is the MAZI Guestbook application
MIT License
7 stars 2 forks source link

Pre-processing of image sizes #2

Open mgaved opened 7 years ago

mgaved commented 7 years ago

Could we have an image pre-processor so users of mazi-board can upload large images and they are pre-processed to a manageable size for display and storage on the MAZI GuestBook?

These days cameras store large image sizes, we don't necessarily want to store or display very large images, nor do we wish to require users to pre-process images before uploading.

Can we use a pre-processor that checks image size and if 'too big' then it will scale them to an agreed maximum size (as defined in /var/www/html/mazi-board/src/node/config.js )

thanks!

deckspace commented 7 years ago

Hi Mark I think you a referring to a transcoding or conforming of an oversized image upload to preset scale much as wordpress does. A pre-process would be done on you local device before posting = easy on a pc harder on a smartphone but not impossible.

mgaved commented 7 years ago

Hi deckspace - thanks for the feedback. You are right, the issue with pre-processing on another device may be hard and we might not have control of what functionality it can offer.

I was wondering if there could be a pre-processor on the Raspberry Pi (or other device that's hosting the Guestbook) so any image size is accepted (well, a defined but larger size e.g. 25Mb?) and is then processed to a smaller size (no bigger than e.g. 2Mb), and the original deleted. So we control maximum file size but offer the opportunity to load up images without too much thinking about maximum file size, then have the MAZItoolkit do the processing.

I suppose a simpler route is to have a text line on the interface warning people of the maximum file upload size! I remember you said you had an issue with people uploading larger images then getting frustrated.

panosnethood commented 7 years ago

Since a few versions, there is an appropriate error message indicating the maximum file size, but processing oversized images would still be very useful. Not trivial though I think to implement.