Announcement board from tamaranga v2 updated to rocky linux8nginx1,28,2,phpmyadmin5,2,3mysql8,00,44 onvps 8 threads,24 ram,200nyme 1. General goal: Translate the image processing and storage system to WebP format using the ImageMagick library. Ensure support for uploading modern formats (HEIC, AVIF) and increase the sizes of previews. 2. Technical requirements for implementation: Architecture: All changes must be implemented through class overrides in the custom/ folder (according to Tamaranga architecture), without directly affecting the core (app/biff/). This is necessary to maintain the ability to update the engine. Library: Replace the standard PHP GD with ImageMagick (php-imagick). Storage format: All generated images (originals and previews) must be saved in .webp format. Input formats: Ensure correct reception and conversion: JPG, PNG, GIF, WEBP, HEIC, AVIF. 3. Image parameters: Original / Zoom: 1200px (on the long side, height — proportionally/false). View: 800px. Thumbnails (s, m): maintain current proportions, but change the format to WebP. Cleanup: The original file after conversion to WebP-original must be deleted to save disk space. 4. Work stages: Server setup (Rocky Linux 8): Installation of ImageMagick, php-imagick, configuration of client_max_body_size limits in Nginx and memory_limit in PHP (at least 512MB). Modification of the base class: Override the method for saving and resizing images in custom/. The logic must automatically change the file extension to .webp when writing to the database. Processing existing photos: The site must continue to correctly display old .jpg files (compatibility), while all new uploads must go in .webp. Testing: Check the upload of heavy photos (10MB+) and specific formats (HEIC from iPhone). 5. Expected result: When uploading any format (for example, HEIC), files with only .webp extension are created in the files/ folder. Entries in the database tables (for example, bfc_bbs_item_images) contain paths to .webp files. Server load is stable, 404 errors when viewing new photos are absent
|