5.0 Pachuco
Chevereto v5.0, codenamed Pachuco, introduces a new JSON API, fine-grained roles and permissions, libvips image processing, JPEG XL support, a fullscreen slideshow and a refreshed interface, and bumps the minimum PHP version to 8.3.
Releases
API V5
A new API.
Chevereto now includes a new JSON API under /api/5/ for users, files, categories, tags, storages, tools and translations. It works with an API key or with the browser session. Access rules run as routing middleware: each route can require login, a role, a permission or a setting. Errors are returned as RFC 9457 Problem Details. API V5 and the Tenants API are described with Schwager API specifications. See Routing changes for the full list of routes.
Roles & permissions
Fine-grained control.
Chevereto now checks granular permissions in addition to the administrator, manager and user roles. Permissions cover granting, editing and deleting administrators and managers, editing, banning and managing users and their content, viewing private content, deleting IP bans, and overriding the search, explore, NSFW editing and Akismet restrictions. Managers can no longer ban administrators or other managers.
libvips
Fast, low-memory image processing.
Chevereto now supports libvips as the image processing library, alongside ImageMagick and GD. To use it, set CHEVERETO_IMAGE_LIBRARY to vips. It requires the PHP FFI extension. The dashboard shows the libvips version in use.
JPEG XL
The next-generation JPEG.
Chevereto now supports the JPEG XL (JXL) image format, and JXL is included in the default CHEVERETO_IMAGE_FORMATS_AVAILABLE. JPEG XL requires ImageMagick or libvips, as GD doesn't support it.
Slideshow
Sit back and watch.
Image listings now have a slideshow. It plays in fullscreen, moving to the next item every 5 seconds, and plays videos with sound that you can mute (your choice is remembered). As it plays, it loads more items and moves on to the next pages. Use the arrow keys to move between items, Space to play or pause, M to mute and Esc to close.
Menus & sharing
Everything at hand.
Album and file pages now have a menu with their actions, and listings have new menu actions. You can set an album cover from a list item. The share modal on listings now includes embed codes, with links, HTML, Markdown and BBCode ready to copy.
Image viewer
Make room for the image.
In portrait orientation, the image viewer now has a drag handle to resize the media display. The browser remembers the size you set. Videos now set MediaMetadata, so the title and artwork appear in the operating system media controls.
Refreshed interface
A cleaner look.
The interface uses Font Awesome 7, a 16px base font size and padding, and more rounded corners. Top bar buttons now show only icons, tabs show only text, and list item tools (select, share) appear on hover. User profiles have a taller background, and the login and signup forms have a button to show or hide the password. "Random" has moved under the "Explore" menu.
Faster authentication
Fewer queries per request.
API key and login cookie checks are now cached. Authenticated requests no longer need a database lookup each time to verify credentials.
New translations
More languages.
Chevereto now includes Bengali (bn), Hindi (hi) and Urdu (ur) translations, and existing translations have been updated.
Routing changes
The following routes have been added:
/api/5/
New JSON API, authenticated with the X-API-Key header or with the browser session (session requests require the CSRF token). Requests from banned IP addresses are rejected, and on private websites guests can only reach /api/5/translations/{locale}.
Users
| Method | Route | Description |
|---|---|---|
GET | /api/5/account | Get the authenticated user. |
GET | /api/5/users/{id} | Get a user. |
GET | /api/5/users/{id}/files | List user files. |
GET | /api/5/users/{id}/albums | List user albums. |
GET | /api/5/users/{id}/search/files | Search user files. Requires search enabled. |
GET | /api/5/users/{id}/search/albums | Search user albums. Requires search enabled. |
GET | /api/5/users/{id}/liked/files | List files liked by the user. Requires likes enabled. |
GET | /api/5/users/{id}/liked/albums | List albums liked by the user. Requires likes enabled. |
GET | /api/5/users/{id}/following | List users followed by the user. Requires followers enabled. |
GET | /api/5/users/{id}/followers | List user followers. Requires followers enabled. |
DELETE | /api/5/users/{id}/follow | Unfollow the user. Requires followers enabled and a non-private account. |
GET PATCH | /api/5/users/{id}/settings | Get and update user settings. |
POST DELETE | /api/5/users/{id}/avatar | Upload and delete user avatar. |
POST DELETE | /api/5/users/{id}/background | Upload and delete user background. |
PUT | /api/5/users/{id}/password | Set user password. |
POST DELETE | /api/5/users/{id}/authenticator-app | Enable and disable user two-factor authentication. |
POST | /api/5/users/{id}/api-key | Create user API key. Requires user API keys enabled. |
DELETE | /api/5/users/{id}/api-key/{apiId} | Delete user API key. |
The settings, avatar, background, password, authenticator-app and api-key routes are restricted to admins and managers, and can't be used on their own account.
Files
| Method | Route | Description |
|---|---|---|
GET PATCH | /api/5/files/{id} | Get and update a file (image, video). |
Categories
| Method | Route | Description |
|---|---|---|
GET POST | /api/5/categories | List and create categories. |
GET PATCH DELETE | /api/5/categories/{id} | Get, update and delete a category. |
Reading categories requires explore enabled. Writing is restricted to admins.
Tags
| Method | Route | Description |
|---|---|---|
POST | /api/5/tags | Create a tag. |
GET PATCH DELETE | /api/5/tags/{id} | Get, update and delete a tag. |
Restricted to admins and managers.
Storages
| Method | Route | Description |
|---|---|---|
GET POST | /api/5/storages | List and create storages. |
GET PATCH DELETE | /api/5/storages/{id} | Get, update and delete a storage. |
GET | /api/5/storages/apis | List the available storage APIs. |
POST | /api/5/storages/{id}/stats/rebuild | Rebuild the storage used space stats. |
POST | /api/5/storages/{id}/records/migrate | Migrate file records to another storage. |
Restricted to admins.
Tools
| Method | Route | Description |
|---|---|---|
POST | /api/5/tools/stats-totals-rebuild | Rebuild the website stats totals. |
POST | /api/5/tools/email-test | Send a test email. |
GET | /api/5/tools/id-encode/{id} | Encode a numeric ID. |
GET | /api/5/tools/id-decode/{id} | Decode an encoded ID. |
GET | /api/5/tools/user/{username}/export | Export a user as JSON. |
Restricted to admins.
Translations
| Method | Route | Description |
|---|---|---|
GET | /api/5/translations/{locale} | Get the translation strings for a locale. |
CLI changes
The following CLI commands have been improved:
cron
Adds a job that deletes expired confirmation records (account activation, password reset and email change) older than 48 hours.
langs
Builds the language cache with the new translator. The output is now Cache languages and ends with [OK] Languages cached.
tenants -C jobs:worker
Each tenant cron run no longer times out (it was killed after 60 seconds). A failed tenant job is logged and the worker moves on to the next tenant, except when running with --id. If listing tenants fails, the worker retries up to 3 times, 5 seconds apart, before exiting. Database and Redis errors still stop the worker.
tenants -C database:migrate
Each tenant migration no longer times out (it was killed after 60 seconds).
System requirements changes
The minimum required PHP version has been bumped to PHP 8.3.
Environment changes
The following environment variables have been added:
CHEVERETO_ENABLE_HOMEPAGE_CUSTOM
Toggles homepage customization. When set to 0, the homepage cover image, title, paragraph and call to action are locked to their defaults.
CHEVERETO_ENABLE_NSFW_CONTROLS
Toggles NSFW controls. When set to 0, the image_lock_nsfw_editing setting is turned off and locked, so users can always edit the NSFW flag of their content.
CHEVERETO_ENABLE_USERS_CUSTOM
Toggles user settings customization. When set to 0, user settings are locked: minimum age 0, avatar max size 1 MB, background max size 2 MB, signup notifications off, and email confirmation required (including for social login signups).
CHEVERETO_IMAGICK_MEMORY_LIMIT
Sets the ImageMagick memory resource limit (default 1G), using php.ini shorthand. The memory-map limit is set to twice this value. Applies only when CHEVERETO_IMAGE_LIBRARY is imagick. Use 0 to keep the ImageMagick defaults.
The following environment variable defaults have changed:
| Variable | Old default | New default |
|---|---|---|
| CHEVERETO_IMAGE_FORMATS_AVAILABLE | ["AVIF","JPEG","PNG","BMP","GIF","WEBP"] | ["AVIF","JXL","JPEG","PNG","BMP","GIF","WEBP"] |
See Environment for the full reference.
