JoliMediaBundle, a new media bundle for your Symfony projects

JoliCode - JoliCodeBlog - 21/11
This is a short story that begins in early 2025 when, while proofreading an article we were about to publish on the JoliCode blog, I noticed an image with rather questionable graphic quality. "— What a shame
Cet article est aussi disponible en 🇫🇷 Français : JoliMediaBundle, un nouveau bundle de médias pour vos projets Symfony.

This is a short story that begins in early 2025 when, while proofreading an article we were about to publish on the JoliCode blog, I noticed an image with rather questionable graphic quality.

“— What a shame to illustrate this article with a diagram featuring washed-out colors and lines that aren’t exactly sharp, ” I said to myself at that moment. I headed to the site’s administration interface to replace this image with a better quality version. And there, surprise: the source image, used to illustrate the article, was perfectly sharp and vibrant!

This was the beginning of a long quest that, one thing leading to another, led to the writing of a new Symfony media management bundle: JoliMediaBundle.

Section intitulée what-is-it-exactly-a-media-managerWhat is it exactly, a media manager?

Throughout the many Symfony projects we have conducted over the last 15 years, we have frequently faced the need to set up a media library, a file explorer, upload functionalities, or similar functionalities.

This type of need appears regularly in the projects we lead, whether they are showcase websites, eCommerce platforms, or business applications. Indeed, multimedia content management is an essential component of many modern Web applications: if my site presents articles, there is a good chance I will want to illustrate them with images. If my site is a shop selling products, visuals will be needed to present them, etc.

More specifically, in our case, the notion of media management covers different aspects: uploading, storage, organization, transformation (resizing, cropping), optimization (compression, format change), delivery, selection and association with business entities, display (in Web pages), etc.

Let’s review these different aspects:

  • uploading media consists of offering users a pleasant experience for sending files from their computer or mobile device to the server. This can include features such as drag-and-drop, multiple file selection, upload progress tracking, and file type and size validation;
  • storage of media involves deciding where and how files will be kept. This can be on the server’s file system or via an online storage service (like AWS S3, Google Cloud Storage, etc.). It is important that the chosen approach is scalable, secure, and adapted to the project’s needs. For example, if the project needs to manage a very large volume of media, the SSD of a VPS might not be the appropriate solution. Conversely, for a small showcase site, local storage may be sufficient, and it is likely unnecessary to complicate the project by integrating an online storage service;
  • organization of media is crucial to allow users to easily find the files they need. This can include creating folders and subfolders, setting up a search system, or even adding metadata to media. The goal is to make the media library intuitive and efficient, and to prevent users from eventually storing all their files in a single root folder out of f...
    [Courte citation de 8% de l'article original]
Loading...