Aggregator
Ex-Trump advisor, Stripe CEO join Meta’s board
MoneyHero faces potential delisting as shares dip below $1
Netflix tests OpenAI-powered search feature
Founders Fund closes $4.6b late-stage venture fund
Dropbox chief customer officer to step down as growth slows
Spotify invests $1.1m to boost French, Dutch audiobooks
Vanguard speeds up Singapore chip plant construction
Indian coliving firm Zolo sells student housing arm for $12.5m
Russian internet firm Yandex co-owner to increase stake in rival
WhatsApp launches new features to enhance group chats, users
China changes chip origin rule to boost local manufacturers
Indian supermarket chain More Retail eyes IPO in 2025
Meta set to begin antitrust trial on April 14
Mario Hernandez: Using modern image formats to improve performance
I've always been drawn to working with images, and when responsive images came onto the scene, I dove deep into learning everything I could about them.
I've written extensively about Responsive images if you need a refresher, but today, let's focus on modern image formats. In particular, WebP.
WebP is a modern image format developed by Google that provides superior compression and quality compared to traditional formats like JPEG and PNG. It supports both lossy and lossless compression, transparency, and animation, making it a versatile choice for web images. WebP helps improve website performance by reducing file sizes, which leads to faster loading times and better user experience.
Is WebP widely supported?Since 2020, all major browsers support WebP. (Check caniuse for details). My site, this site, uses WebP exclusively for most images and although it is not a big site, I still see performance improvements.
Updating Drupal to use WebPYou would think that a big upgrade like this would be a complex task but you'll be surprised to learn that enabling WebP for new and existing images in Drupal is straightforward. Let's quickly go over the steps.
Edit each of your image styles and add the Convert effect.
Fig. 1: Selecting the Convert effect for an image style.
Select and add the WebP format to the image style.
Fig. 2: Adding the WebP format to an image style.
That's it!
Fun fact!: WebP support was introduced to Drupal core in Drupal 9.2.0, which was released on June 16, 2021. Before this core integration, WebP support in Drupal was only available through contributed modules or custom code. The inclusion in core made the format's benefits available to all Drupal 9.2+ sites without requiring additional modules.
DemoI did a quick and simple test to show the difference in file size when adding a typical JPEG image to an article, then converting it to WebP using the steps above. The test was done in Drupal 10.x.
First: Using a JPEG imageUsing a JPEG image on an article node, shows a file size of 289kb.
Fig. 3: Example shows using a JPEG format.
Then: Using a WebP imageAfter converting the imag eto Webp by updating the image style of that image, the file size was reduced to 76kb. That's about 60% file size reduction.
Fig. 3: Example shows using a WebP format.
NOTE: This was a pretty basic comparison test. File size reduction will vary depending on original file zize, format, and other preferences on your site.
What about other formats like Avif?The Avif image format is also a great option with many benefits. The browser support is really good at the time of this post (See caniuse), and it's worth looking into it as an alternative to WebP, or even combining the two depending on your media needs.
In closingIt's all about the small wins. This one is pretty simple but can provide significant performance benefits. Give it a try!
Resourcesmark.ie: My LocalGov Drupal contributions for week-ending April 11th, 2025
Open source, sometimes you keep up with the notifications, and sometimes the notifications keep up with you.
The Drop Times: What the Keynote Speakers Are Bringing to Drupal Developer Days 2025
The Savvy Few: The European Accessibility Act: Everything You Need to Know
The European Accessibility Act (EAA) introduces new EU-wide rules to ensure digital products and services are accessible to everyone, including people with disabilities. By June 28, 2025, all businesses and organizations that offer digital…
Read moreGolems GABB: Drupal cloud development using devcontainers
Hi there! What is the best way to improve Drupal development and encourage teamwork among development groups? This question is important for many developers, especially as remote teams and complex projects become more common. Setting up and maintaining traditional Drupal development environments can take a lot of time, often leading to problems and delays. In this article, your Drupal development company will look at how devcontainers can improve your Drupal cloud development process for the better.