- How do I install buglinjo/laravel-webp in a Laravel application?
- Run composer require buglinjo/laravel-webp. Laravel's package auto-discovery registers the service provider and facade alias, so no manual wiring is normally needed. If you want to tweak defaults, publish the config with php artisan vendor:publish and adjust it. There is no bespoke infrastructure to set up.
- How do I convert a JPEG or PNG to WebP with the laravel-webp facade?
- The package exposes a single, small API surface through its facade: you point it at a source image, optionally set a quality value, and save the WebP output to a destination path. That is enough for typical upload pipelines where a controller or a service class hands off a stored file. The same API also covers cleanup so you can remove originals once conversion succeeds. Because the facade call is thin, it is easy to wrap in your own image-upload abstraction.
- How do I control WebP quality with buglinjo/laravel-webp?
- Quality tuning is part of the conversion API, so you can chain a quality value before saving the output. Typical values sit in the 75 to 90 range, trading file size against visible artifacts. Always validate on a representative sample of your own images, since the sweet spot differs between photography, flat UI graphics, and images with alpha. Quality settings are the main lever you have for balancing bandwidth savings against perceived quality.
- Which encoder does buglinjo/laravel-webp use to generate WebP files?
- The package is a thin service-provider and facade wrapper, not an imaging engine; the real encoding is delegated to a backing encoder such as GD, Imagick, or a cwebp binary. That backing encoder is the actual architectural dependency you need to understand. Check the published config and README for the default in your installed version and confirm whether it is switchable. Whatever the default, verify it is present and working in every environment you deploy to.
- What PHP extensions or binaries do I need for WebP conversion in production?
- You need whichever encoder the package is configured to use, which generally means ext-gd or ext-imagick compiled with WebP support, or a cwebp binary on the system path. This requirement is invisible at composer install time and surfaces as a runtime failure, so bake it into your container base images and CI runners. Check local dev, CI, staging, and production separately, because they often diverge. If you use Imagick, confirm WebP is in its supported formats list rather than assuming it.
- Does buglinjo/laravel-webp support Laravel 13?
- Version 3.2.0 added Laravel 13.x compatibility, contributed as a community pull request from laravel-shift. It is described as a compatibility-only release with no API changes, so the migration risk for the package itself is negligible. Pin to ^3.2 rather than ^3.0 so that commit is guaranteed to be present. Apps on older Laravel versions should verify the 3.x line still covers them before upgrading the framework.
- Is WebP conversion synchronous, or can I queue it with Laravel jobs?
- Conversion happens when you call the facade, so it runs synchronously in the request or command that invokes it. The package does not appear to ship queue or job helpers, which means dispatching conversion to a queued job is left to you. For large uploads or bulk backfills, wrap the call in a job with retries and timeouts rather than converting inline. Instrument conversion time before rollout so you know whether inline is acceptable for your corpus.
- Is buglinjo/laravel-webp a replacement for intervention/image?
- It overlaps with intervention/image but is narrower: it focuses on producing WebP output rather than being a general imaging toolkit. If you already standardize on intervention/image, or you deliver images through a CDN pipeline such as Cloudinary, imgix, or Cloudflare Polish, adding this package is a redundant layer. It fits best in apps that just need a quick, framework-native JPEG and PNG to WebP step. Adopting it behind an existing image abstraction keeps your exit path open either way.
- Does buglinjo/laravel-webp handle animated WebP, alpha transparency, or metadata stripping?
- The package's documented scope is straightforward JPEG and PNG to WebP conversion with quality tuning and cleanup, so do not assume animated WebP support or metadata handling. PNG images with alpha and animated GIF sources are exactly the cases that expose encoder-level differences. Spike a branch and convert a representative corpus including large JPEGs, alpha PNGs, animated GIFs, and CMYK files before committing. Whatever the outcome, measure both output size and visual quality.
- Is buglinjo/laravel-webp still maintained and safe to adopt in production?
- It is a small, single-maintainer package, and the Laravel 13 compatibility work came from laravel-shift rather than the maintainer, which is a signal about bandwidth and bus factor. There is no tagged support policy or long-term release cadence to rely on, so treat version pinning as essential. The technical risk is moderate-low: the package itself is a thin wrapper, and the real risk sits in encoder availability and framework alignment. Introduce it behind your own abstraction and canary a single upload path before rolling it out broadly.