Before: Only PNG images could be uploaded (implemented in #35) and displayed.
Now: PNGs, JPGs, JPEGs, GIFs and WEBPs can be uploaded. They are all converted to WEBPs to be displayed.
Done:
[frontend] <input accept=image/png, image/jpg,..."> prompts users to select right datatype
[frontend] show users a red input when file is too big and disable submit button until its size is okay (see assets/js/enforceFileUploadSizeLimits.js and its 4 usages)
[backend] create a helper that can hand out image validation rules + convert images to webp and save those (see image_helper)
therefor add two more php extensions ext-exif and ext-gd (see composer.json)
[backend] add logic in controller to handle file upload (see AdminController.php)
[frontend] enable the admin/GroupsView and admin/SchoolsView.php to display errors from the file upload validation
[static assets] turned all PNG images into WEBP ones
[frontend] adapted School- and GroupView.php to display these WEBP images
Before: Only
PNG
images could be uploaded (implemented in #35) and displayed.Now:
PNG
s,JPG
s,JPEG
s,GIF
s andWEBP
s can be uploaded. They are all converted to WEBPs to be displayed.Done:
<input accept=image/png, image/jpg,...">
prompts users to select right datatypeassets/js/enforceFileUploadSizeLimits.js
and its 4 usages)image_helper
)ext-exif
andext-gd
(seecomposer.json
)AdminController.php
)admin/GroupsView
andadmin/SchoolsView.php
to display errors from the file upload validationPNG
images intoWEBP
onesSchool
- andGroupView.php
to display theseWEBP
images