logo d'article
✓ Published0🌍 Public
PPhilippe Rivière
Last edited Apr 18, 2015
Created on Apr 18, 2015
This example shows how to automatically generate a standardized square logo for an article when no explicit logo is provided. It first scans the article’s documents for an image file (JPG, GIF, or PNG) and uses that as the logo, otherwise it falls back to a user-supplied logo. The chosen image is then cropped and resized to 100×100 pixels using SPIP’s `image_passe_partout` and `image_recadre` filters. The rendering is handled through a SPIP template pipeline that calls a custom PHP function, `traiter_logo_article`, which uses `recuperer_fond` to render the logo snippet.
AI-generated description