Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Lio Laravel Package

bvtterfly/lio

Lio is a Laravel package by bvtterfly that provides a clean, Eloquent-friendly API with sensible defaults and minimal configuration, making it easy to integrate into existing Laravel applications and workflows.

View on GitHub
Deep Wiki
Context7

Easily optimize images using Laravel

Frequently asked questions about Lio
What is bvtterfly/lio used for in Laravel?
Lio is a Laravel package that provides an Eloquent-friendly API for optimizing images. It is designed as an integration layer over pluggable optimizer backends, with sensible defaults and minimal configuration. It fits best in applications where image handling is already important, such as media libraries, CMS uploads, and e-commerce catalogues.
How do I install and configure bvtterfly/lio in a Laravel application?
Install it with Composer, publish the package configuration if you need to customize оптимizers or pipeline behavior, and wire the optimization step into your existing upload or storage workflow. It assumes a standard Laravel app with the filesystem abstraction already in place. No database migrations are implied by a patch release, so integration is mostly dependency and configuration work.
Does Lio work with Laravel queues and storage disks?
Yes. Image optimization is naturally asynchronous, so Lio fits well in a queue-driven architecture where a job handles optimization after upload. That keeps remote optimizer latency out of the request path. It also works with Laravel's filesystem abstraction, so local and S3-compatible disks can be used alongside your existing storage setup.
Which image optimizers does Lio support, and is reSmush required?
Lio uses pluggable optimizer backends, and reSmush is one of them rather than core infrastructure. Whether reSmush is enabled by default depends on the published configuration for your version, so check the config after installation. Local binary optimizers such as jpegoptim, optipng, and cwebp are the natural substitutes when you want to avoid third-party egress.
How can I disable reSmush or switch to a local optimizer like jpegoptim?
Because optimizers are pluggable, switching away from reSmush is generally a configuration concern rather than a fork of the package. You should confirm the exact optimizer keys and per-environment settings in the docs for your installed version. If you need strict control, disable remote optimization outside production and test the pipeline with a local backend.
What happens when the remote optimizer service is down or rate-limited?
The important question is the pipeline's failure contract: decide whether an unavailable remote optimizer should fail the upload or pass the original image through. Do not assume silent pass-through is safe, because optimizer bugs often show up as unchanged file size or corrupted output rather than hard errors. Add explicit fallback behavior and assertions around output validity, especially when the remote service is rate-limited or timing out.
Does Lio upload my images to a third party, and does it strip EXIF metadata?
Using reSmush means image assets leave your infrastructure over HTTP, so you need outbound network access, egress allow-listing, and a data-residency decision before production use. Local optimizers avoid that third-party transfer. Metadata stripping is not something you should assume by default; strip EXIF and embedded thumbnails yourself before sending user-generated or sensitive images to any remote service.
Is bvtterfly/lio production-ready, and what risks should I evaluate?
Lio is reasonable for production when you accept the external optimizer risk and add your own verification coverage. The main risks are third-party dependency, silent degradation, compliance around sending images off-premises, and underspecified patch notes such as the 2.0.1 reSmush bugfix. The PHP integration itself is low-risk, but correctness is partly outside the package's control.
How do I test Lio image optimization in a Laravel application?
Test both the Laravel integration and the optimizer contract. Mocked HTTP fixtures are useful for fast tests but can miss real service defects, which may explain how optimizer bugs ship. Add at least a small integration or staging test that asserts the output image is valid and actually changed, not merely that the request returned a success status.
What are alternatives to Lio for Laravel image optimization?
Alternatives depend on whether you need optimization only or a full imaging library. For local-only optimization, wrap binaries such as jpegoptim, optipng, and cwebp in your own job or use a package that does so. If you also need resizing and cropping, Intervention Image plus a local optimizer is a common combination; Lio itself optimizes images rather than replacing a complete imaging library.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections