Implementation of support for modern formats (HEIC, AVIF, WebP) and conversion to WebP for the Tamaranga CMS bulletin board v2, updated to rocky linux, php 8x, nginx1,28,2, mysql 8,0044phpmyadmin 5,2,3 on vps 8 streams, 24 RAM, 200nyme
1. Goal:
Modernize the image processing system on the site. Ensure the acceptance of heavy formats and automatic optimization of all uploaded photos to WebP format to save space and speed up loading.
2. Tasks:
- Expanding format support: Configure the server and engine to accept and process:
JPEG, PNG, GIF, HEIC (from iPhone), AVIF, WebP. - Integration of ImageMagick: Instead of the standard GD library, use ImageMagick (Imagick) for photo processing (resize and conversion), as it works better with HEIC and WebP quality.
- Modification of the base class: Make changes to the core (presumably
app/biff/ or system processing classes) so that conversion to WebP occurs at the system level, not just in the announcements module. - Preview sizes:
Original / Zoom: 1200px (on the wide side, height proportionally).View: 800px.Others (m, s): keep current, but convert to WebP.
- Logic of operation:
- The user uploads any photo (including HEIC/AVIF).
- The system resizes.
- The final file is saved strictly in .webp format.
- The database path to the file is updated with the new extension.
3. Server requirements (Rocky Linux 8):
- Install and configure
ImageMagick and php-imagick.
What to pay attention to:
Make sure that old photos (in .jpg format) do not get "broken". The site must be able to simultaneously display both old files and new .webp, until you perform a full regeneration.
The subdomain is already ready with all accesses