Weave Code
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
Sulu Media Extra Bundle

Sulu Media Extra Bundle Laravel Package

alengo/sulu-media-extra-bundle

View on GitHub
Deep Wiki
Context7

Media utilities for Sulu CMS — @2x crop sync, format generation, media rename command

Frequently asked questions about Sulu Media Extra Bundle
Does this bundle work with Sulu CMS 4.x or only 3.x?
This bundle is currently locked to Sulu CMS 3.x due to hard dependencies on its media system (e.g., `MediaCropModifiedEvent`). Upgrades to Sulu 4.x may require custom adjustments or waiting for a compatibility update from the maintainers. Always test in a staging environment if considering Sulu 4.x.
How do I enable only the @2x crop sync feature without using the rename command?
The bundle’s features are modular, so no extra configuration is needed. Simply install the bundle, and the `@2x` crop sync will activate automatically via the `MediaCropModifiedSubscriber`. The rename command and other features remain optional and won’t interfere unless explicitly used.
Can I use this bundle with custom media storage (e.g., S3, Azure Blob) instead of local filesystem?
The bundle assumes standard filesystem storage for the rename command. If using cloud storage, you’ll need to override the `media.rename.handler` service to implement custom logic for your storage adapter. The `@2x` crop sync and format generation features work independently of storage backend.
What happens if my `image-formats.xml` is malformed when running the generate command?
The `alengo:media:image-formats:generate` command appends new entries to the existing `image-formats.xml` file. If the file is malformed, the command may fail or produce invalid XML. Always back up the file before running the command and validate the output manually, especially if using custom schemas or namespaces.
How do I test the @2x crop sync feature in a non-production environment?
Create a test media entry in Sulu with a crop format containing `@2x` (e.g., `800x@2x`). Save the crop, then verify the base format (`800x`) now has identical crop coordinates. Use Symfony’s debug toolbar or database inspection to confirm the `me_format_options` table was updated correctly.
Is there a way to preview changes before running the media rename command?
Yes, use the `--dry-run` flag with the `alengo:media:rename` command to simulate renaming without modifying files or the database. However, note that edge cases like locale-specific filenames or special characters may still require manual validation.
Will this bundle conflict with other Sulu media-related bundles (e.g., sulu/media-bundle)?
No known conflicts exist, but always test in a staging environment. The bundle extends Sulu’s media system rather than overriding core functionality. If you’ve customized the `sulu/media-bundle`, ensure your overrides aren’t duplicated or overridden by this bundle’s services.
How do I migrate existing @2x crops to use the auto-sync feature?
Run the `alengo:media:image-format-options:duplicate` command to backfill existing `@2x` crop entries to their base format keys. This ensures the auto-sync feature works retroactively. After migration, new crops will sync automatically, but existing ones may need manual review for consistency.
Can I customize the YAML schema for image format generation?
The bundle expects a simple list of format keys (e.g., `400x300`, `800x@2x`) in the YAML file. While the schema is flexible for basic formats, complex customizations (e.g., additional XML attributes) may require extending the bundle’s `ImageFormatGenerator` service or overriding its templates.
What Laravel-specific considerations should I keep in mind when using this bundle?
This bundle is designed for Sulu CMS (Symfony-based) and isn’t a Laravel package, but it can be integrated into Laravel projects using Sulu as a backend. Ensure your Laravel app doesn’t interfere with Sulu’s media workflows, and use the bundle’s CLI commands via Symfony’s console component or a Laravel artisan wrapper.
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.
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium