How to Identify Unused Images in Wagtail CMS

This video is from Wagtail CMS 2025 .

How to Identify Unused Images in Wagtail CMS
0:05:24
Published April 24, 2025
232 views

Images can pile up quick in a content management system. This video shows you how to used Wagtail's image usage metrics to identify unused images and remove them from your image library. This method will help you keep your image library fresh and reduce the number of stale, unused files you're keeping on your website. See how a little sorting with Wagtail's built-in image metrics can help you make the most out of your images.

Join us for What's New in Wagtail! Sign up here: https://wagtail.org/blog/whats-new-in-wagtail-may-2025/

Get our newsletter here: https://wagtail.org/newsletter/

đź’» Wagtail is the easiest open-source Python CMS to use:
Install the demo and start building your first site in 10 minutes: https://wagtail.org/get-started/

📹 Related Videos To Watch Next:

â–¶ Quick Video Tour of Wagtail CMS 6.4 https://youtu.be/K_xleuYgL_4
â–¶ The Latest on Wagtail AI https://www.youtube.com/watch?v=4zfs1u4Vy5Y
▶ What’s New in Wagtail CMS 6.0 https://www.youtube.com/watch?v=2AxLFyOFjQo

Wagtail future proofs your CMS system, as it’s open source, continuously updated and built on Python, one of the most popular global programming languages, used widely in machine learning and big data. So you’re always ahead of the curve when it comes to CMS platforms.

Wagtail is the #1 choice for accessibility, is scalable and most importantly, secure.

👉 Get started with a FREE Wagtail CMS TRIAL: https://wagtail.org/get-started/
and see how easy it is to build a website that works for you.

📊 Read why Google, NASA, and the British NHS, are powering their digital estates with Wagtail: https://wagtail.org/about-wagtail/

🎥 More Wagtail Videos: https://www.youtube.com/watch?v=cne2kxemMAQ&list=PLfwZ-fob20cPvSQ_v1hkjto8BAPN21tLJ

📣 Follow us on social:

#WagtailCMS #Django #content #contentmanagement

Summary

Megan shows how to find potentially unused images in Wagtail by sorting the image library by oldest items, selecting a page of images, and using the delete action to reveal each image’s usage count before confirming anything. Images used zero times can be opened and checked for context, with copies optionally saved before deleting them; images used once deserve extra review because Wagtail still counts images on private or draft pages as used. She plans to remove genuinely obsolete images and inspect lightly used ones more carefully.

Key takeaways

  • Sorting images by age helps identify items that are more likely to be obsolete after content has been archived or reorganised.
  • Selecting images and choosing Delete displays their usage counts before any deletion is confirmed.
  • Zero-use images should be opened and checked to verify that they are no longer needed.
  • An original image can be saved locally as a backup before deleting it from the web server.
  • Images marked as used once may still belong only to draft or private pages, so they need additional review.

Summarised automatically from the transcript.

Transcript

974 words · auto-generated Show

Automatically transcribed, so expect mistakes in names and technical terms.

0:00

Hey y'all, Megan here. I'm doing some image cleanup on Wagtail. org this week and I thought y'all would like to see how I go about it. Alright, so right here we have The uh wagtail. org image library. I went ahead and sorted it to the oldest images in the library just because those are the ones that are most likely not to be used anymore. We did a lot of like archiving of pages and moving content around and things like that. So chances are there are some images that are not really being used anymore or being underused. So let's go ahead and click on an image here and then I'm gonna select all and then I'm gonna do something a little unintuitive here. I'm gonna hit the delete button Yeah, delete.

0:46

But don't worry, watch what happens. When you hit delete like this, you get a are you really sure message before it Wagtail just obliterates your images Uh so and that's one of the things that I love about Wagtail is that it really is kind of like, are you sure? Are you really sure? Um before you get a chance to delete things. And so it's it's a very useful feature. And what you get is this whole list of images on that page, and you not only get their names and things like that, but also you can see at a glance like uh how many times they've been used. And just, you know, scanning down here, I can see that, you know, all these images have been used one or two times.

1:32

So in this case, I definitely don't want to delete these images without taking a closer look at what they're being used for. So I'm gonna go ahead and say let's let's not delete these. And I actually went through a couple pages of our older images before I it occurred to me that I should show you guys uh how I'm going about this. So I'm gonna go ahead and click through to our third oldest page of images. Uh and I'm gonna do the same thing. I'm gonna go ahead and select all the images here and then I'm gonna hit that delete button uh no matter you know how wrong it feels Uh, you know, I take comfort in knowing that this message will stop me uh

2:19

and keep me from going too far. And so as you can see Uh once again we have you know a bunch of images that are used one time, but we also have a bunch that are used zero times here. And what I'm gonna do Because I have this nice handy dandy list here is I'm just gonna go ahead and right click and open the image up in a new tab. And I'm just gonna go ahead and do that for a few images. If y'all weren't watching me, I would just go ahead and do that for the whole page, just so that I have everything open in fresh tabs and can keep track of things. And so when I click over to this tab here, we can see we have this older image. It was probably from like a way older version of Wagtail.

3:08

Uh back before, like you can see here we have like you know the old uh sidebar and things like that. Uh this is definitely a very, very old image and we definitely don't use it anymore. So, you know, I can confirm that it's not being used. Also, if I really wanted to save a copy, what I can do here is I can open up the original image in a new tab as well. I can just go ahead and right click, save image as, and I kind of have a backup folder here of images that I'm like well maybe I might want to use them later and don't want to completely delete them, but they shouldn't really live on the web server anymore. So you can definitely do that if you want to as well. It really depends on what sort of backups you want.

3:55

But once you've made your decision that, you know, this image really has no use anymore, you can be like Marie Kondo if you want. You can thank the image for what it did for you back in the day when it was useful. But now it's time to let it go. And so in making that decision, I'm going to go to the actions menu right here. And then I'm gonna hit delete. And once again, I'm prompted. Do you really want to do this? Uh and yes, I'm gonna go ahead and do this. Alright, so uh pretty much what I'm planning to do is to go through all our images that are being used zero times and do exactly that. I will probably also do a pass and look a little closer at the images that are being used once, just because Wagtail will say

4:42

even if a page uh has been moved to private or if it's still in draft state uh that the image is being used. So it's worth taking a closer look at those as well. All right, if you enjoyed that tip, uh please consider signing up for our newsletter this week in Wagtail. You can find that at wagtail. org slash newsletter Also, we have a webinar coming up in May. If you'd like to meet me and other members of the core team in person, please consider coming along. I'm going to include the link down in the video description. We got two times Uh for two different time zones, whichever time works the best for you, please come along. I really hope you can make it

Questions this talk answers

How can I find unused images in Wagtail?

Select a group of images in the oldest part of the image library and choose Delete; Wagtail shows a confirmation page listing how many times each image has been used. Use that list to focus on images with zero uses, while reviewing images used once more carefully.

Discussed at 0:46

How do I verify that a Wagtail image with zero uses is safe to delete?

Open the image in a new tab and inspect it in context, checking whether it belongs to an obsolete part of the site or an old version of Wagtail. If it has no remaining purpose, delete it from the image’s Actions menu and confirm the deletion.

Discussed at 2:19

How can I back up a Wagtail image before deleting it?

Open the original image in a new tab, right-click it, and use “Save image as” to keep a copy in a backup folder before removing it from the web server.

Discussed at 3:08

Do Wagtail image usage counts include images on private or draft pages?

Yes. Wagtail still counts an image as used when it appears on a page that is private or still in draft, so images reported as used once deserve an additional review.

Discussed at 4:42

Note: We understand that names change, people change, and bodies change. We respect each individual's journey and privacy. If you have any concerns about a video or need us to remove content, please don't hesitate to contact us. We will handle your request with care and promptly address any issues.

More videos from Wagtail CMS