MediaBundle: Is a Self-hosted Media File Manager

MediaBundle is a media file manager bundle for Symfony with a REST API and an admin interface (React)

MediaBundle is a media file manager bundle for Symfony with a REST API and an admin interface (React). It provides a clean and user-friendly way to upload, edit and delete files. It supports multiple formats. You can upload images, videos, audios, documents, zip files, etc.

MediaBundle automatically compress your media files to reduce their size without sacrificing quality. Additionally, it offers the ability to resize your media files to fit specific dimensions (breakpoints), making it easy to ensure that your images are the correct size for your website.

MediaBundle also integrates with your database to store and manage your media files efficiently. This means you can keep track of all your media assets in one place, similar to how WordPress manages media files. This way, you can have all your media files organized and accessible in one place.

Features

  • User-friendly interface
  • Offers a wide range of configurable options, allowing you to customize its behavior to fit your needs
  • Single or multiple upload
  • Drag & drop
  • List or grid view
  • Edit alt, title and name
  • Single and bulk delete
  • Search filters
  • Select single or multiple media with different form types
  • Sort by date. Soon I will add more sort options
  • Prevent media file name duplication
  • Resize images on upload, supported by:
  • Imagick extension
  • GD extension
  • Compression of images, supported by:
  • Jpegoptim
  • Optipng
  • Pngquant
  • Gifsicle
  • Svgo
  • Cwebp
  • Generate thumbnails with 4 types of breakpoint (responsive formats) with the following default sizes:
  • Large: [1024], I only put the width because that way the height is automatically calculated by saving the aspect ratio. Although you can change it, you can see it in configuration
  • Medium: [768]
  • Small: [576]
  • Xsmall: [130, 130]

Advantages

  • One of the advantages of using this bundle is that it is compatible with any Symfony project, whether using EasyAdmin or any other content management system. This means it can easily be integrated into your existing project without having to worry about compatibility issues.
  • The interface is built with React, not jQuery, which means it is more modern and efficient.
  • File resizing and compression is handled on the server side (admin), not endorsed to the client, which saves resources and improves performance.
  • The interface is inspired by WordPress, a widely-used and well-respected platform, which means it is user-friendly and reliable.
  • Media File Manager is managed through the database, rather than the hard drive, which means it is more organized and easier to manage.
  • The Media File Manager is designed with SEO in mind, which means it can help improve your website's search engine rankings.
  • You can choose not to secure the routes, which means you have more flexibility in how you use the Media File Manager.
  • The Media File Manager is designed to be scalable and customizable, thanks to its use of interfaces and Dependency Inversion Principle (DIP). This allows for the creation of reusable and adaptable components that can be modified without changing the existing code.
  • By adhering to a Hexagonal/Layered Architecture and Domain-Driven Design (DDD), the Media File Manager is able to maintain a clear separation of concerns and prioritize the business logic.

Requirements

  • PHP 8.1 or higher
  • Symfony 5.4 or higher
  • Doctrine ORM (MySQL, MariaDB, SQLite, PostgreSQL)
  • Imagick or GD extension: Recommended Imagick extension because it supports more formats than the GD extension
  • Optional compression tools:
  • Jpegoptim
  • Optipng
  • Pngquant
  • Gifsicle
  • Svgo
  • Cwebp

License

  • MIT license

Resources