comur/image-bundle
Symfony bundle for image upload and cropping in forms. Built on jQuery File Upload and JCrop with Bootstrap-friendly widgets (single image or gallery), library selection, ordering, and optional Imagick support for animated GIF cropping.
blueimp-file-upload, Jcrop). Modern Symfony projects typically use Webpack Encore or Vite, requiring either:
fos_js_routing, comur_image), which is straightforward but may clash with existing routing setups (e.g., API Platform’s auto-routing).croppable_image_modal.html.twig) must be included in layouts, which is simple but global—hard to exclude from non-image forms.uploadUrl deprecated in favor of uploadDir (security fix #80). Ensure all entities use uploadDir.fileExt/maxFileSize. Risk of malicious files (e.g., .php uploads) unless paired with a firewall (e.g., Symfony’s UploadedFile validation).uploadDir must be sanitized (e.g., prevent ../../ paths). The bundle assumes public_dir is trusted.comur_api_upload, comur_api_crop) for direct file handling.getUploadDir()/getWebPath() methods.composer require comur/image-bundle.config/bundles.php and add routes (fos_js_routing, comur_image).croppable_image_modal.html.twig).fos_js_routing script to <head>.AppKernel.php.routing.yml.blueimp-file-upload, Jcrop) to node_modules and configure Webpack to handle them.Encore
.addEntry('comur-assets', ['jquery', 'blueimp-file-upload/js/jquery.fileupload', 'Jcrop'])
.splitChunks({ chunks: 'all' });
uploadDir() and getWebPath() methods to entities.array (Doctrine will serialize it).uploadDir()/getWebPath() methods.array field and test serialization.CroppableImageType or CroppableGalleryType to forms.blueimp-file-upload/Jcrop.comur_image YAML, but entity-specific paths (uploadDir) require discipline to avoid inconsistencies.How can I help you explore Laravel packages today?