We are on our journey to master the Drupal performance, after having our previousPart 1: Caching published a couple of weeks ago, we've been lucky enough to get into Issue 386 of TheWeeklyDrop newsletter, Planet Drupal, and got much love and good feedback on Twitter.
Note: You don't necessarily have to do all of these, some items listed here are replaceable with each other as well, so proceed with caution!
Faster Drupal - Part 2: Aggregation and CDN
The one and the only holy grail: Advanced CSS/JS Aggregation On every Drupal optimization post you’d read you have to setup and configure AdvAgg module, but you gotta do what you gotta do! AdvAgg features and core benefits are listed on the module page completely, so go ahead and read them all, configure it the way that works best for you and move on Advanced CSS/JS Aggregation Drupal module
Note: If you have Mod Pagespeed you might not need AdvAgg module, make sure that you don't overlap your own workBut that’s not all, if you are on Drupal 7, you should consider checking Speedy module as well, in some areas, this might work a bit better so make sure to check it out as well Speedy module
For good JavaScript minification in Drupal, you can use modules such as minify but we’d like to recommend minifyJS instead, they listed the differences and benefits on their module page so check it out Drupal MinifyJS module
CDNize the whole project, as much as you can! You may use CDN module too
Move JavaScript to the footer if necessary, some JS files need to be rendered in the head based on the use case and what does the JS do! Also in Drupal 8, it’s quite easy to append your necessary library (Read it JS files) in the footer in twig template files
Consider if you can make your own scripts defer/async (a new challenge when it comes to Drupal js aggregation)
Okay, this round was much easier thanks to AdvAgg module for taking care of half of the things we need to do for us! Note that on the frontend side you can Uglify, Minify and make sure everything that you code, will become compressed, whether it’s CSS, JS or even images or SVG files! Now let's get to it, Image optimization.
Image optimization
Drupal 8: Use the Responsive Image module wherever possible and create the appropriate styles. It uses the <picture> tag which is what we really want
One might say we have one too many image optimization modules in Drupal, which is a good thing! For that we tested some, experienced with some of them and here’s what we suggest: Use blazy and lazyload_images (Drupal 8 that uses IntersectionObserver instead of scrolling events), Also consider: lazyloader and image_lazy_loader when using the picture module for responsive images in Drupal 7. There is also a lazy loading option that works well
Image optimization: for main images/icons used in the design (Yes you can optimize SVG files as well), also the best tool for that is not in Drupal, try ImageOptim desktop app, Also there’s an API-based service available with a Drupal 7 module, take a look here, might worth setting/selling this up to clientsAlso in the same context, we can use ReSmush.it which is free (But should donate some beer to them) Drupal 7 Module, Drupal 8 Module
Image formats like JPEG 2000, JPEG XR, and WebP often provide better compression than PNG or JPEG, which means faster downloads and less data consumption. There's a really good module that help you serve WebP, it's called, you guessed it; WebP.
Ramsalt Lab, one of Northern Europe’s leading web development agencies, is pleased to announce a new phase of growth with strategic changes to its leadership team.
Ramsalt is a people-first, remote-first agency built on Scandinavian values of openness, responsibility, and trust. We work with mission-driven clients — from NGOs to universities and publishers — and care about clean code, real collaboration, and a sustainable way of working.
Vi ser etter en prosjektleder som elsker å jobbe med både mennesker og teknologi – en som trives i dialog med kunder og teamet, og evner å holde roen og oversikten når tempoet er høyt. I denne nøkkelrollen vil du drive komplekse webprosjekter fra idé til vellykket lansering, med et kontinuerlig fokus på fremdrift, kvalitet og fornøyde kunder.