Upgrading
Changes within 1.x that can affect existing installations. The full list is in the CHANGELOG.
After upgrading compare your published config/imagepresets.php with the package’s version — new keys fall back to their defaults, but comments and examples are only in the new file.
-
driverfalls back to the project-wideIMAGE_DRIVERwhenIMAGEPRESET_DRIVERis not set. IfIMAGE_DRIVER=imagickis set for another package, presets silently switch from GD to Imagick. SetIMAGEPRESET_DRIVER=gdto keep GD. The published config must contain the new line to pick this up:'driver' => env('IMAGEPRESET_DRIVER', env('IMAGE_DRIVER', 'gd')), -
New opt-in
verify_decodeandimagepresets:verify --deep, see Cache maintenance.
- Generated files are written to a temporary file and renamed after an integrity check. Files broken by earlier crashes stay in the cache — run
php artisan imagepresets:verifyonce (local disks only).
- New
trusted_bypassand the third$bypassargument ofimagepreset_url()/Imagepreset::url()/@imagepreset(). Off by default. - Internal fallbacks changed when the config key is missing: route prefix
imagepreset(wasimagepresets). Only matters for a published config withoutroute.prefix.
- SVG responses always get the long-lived
Cache-Control(previouslyno-storeon first generation). - On a lock timeout the endpoint answers 503 instead of 500.
- New
remote_redirect/remote_redirect_ttl.
- The response that generates a file has
Cache-Control: no-store; later responses get the long-lived header. A CDN caches an image from its second request on.
1.9 — route prefix and name
Section titled “1.9 — route prefix and name”The default route prefix and name changed from imagepresets to imagepreset.
route('imagepresets', …)→route('imagepreset', …).- Hard-coded
/imagepresets?…URLs, nginx locations, CDN rules — update to/imagepreset. - Generated files keep working: their names don’t depend on the route.
To keep the old URLs:
IMAGEPRESET_ROUTE_PREFIX=imagepresetsIMAGEPRESET_ROUTE_NAME=imagepresetsaudit_log.channelandIMAGEPRESET_AUDIT_LOG_CHANNELwere removed. Audit entries go to the default log channel.