# One image for multiple categories

**URL:** https://meta.discourse.org/t/one-image-for-multiple-categories/260127
**Category:** Support
**Created:** [March 31, 2023, 4:31pm UTC](https://meta.discourse.org/t/one-image-for-multiple-categories/260127 "2023-03-31T16:31:46Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [March 31, 2023, 4:54pm UTC](https://meta.discourse.org/t/one-image-for-multiple-categories/260127/2 "2023-03-31T16:54:30Z")

</div>

> [@sterretje](#):
>
> it eats disk space on the server

It does not. Images are stored by a hash, so only a single copy will be created/stored no matter how many times it’s uploaded.

If you have access to rails you can do something like this:

```ruby
parent=Category.find_by_slug('category_a');
children=Category.where(parent_category_id: parent.id);
children.update_all(uploaded_logo_id: parent.uploaded_logo_id);

```

The trailing semicolons keep rails from putting the output in a viewer, so you can paste all three lines at once. You might omit them when you try this out. You should make a backup and be willing to restore it if you’re not trying this first on some kind of test or staging site.

You can suggest that your overloards read [It’s Time We Talked About Tags](https://meta.discourse.org/t/its-time-we-talked-about-tags/72467). Or maybe there is some good reason for all of the subcategories. Unless you need to limit access to those subcategories or people will want to watch/mute those categories, they are probably doing to make things worse for everyone (except the person who gets bragging rights that their bad idea was the one that was accepted by the Whole Company).

---

_[View the full topic](https://meta.discourse.org/t/one-image-for-multiple-categories/260127)._
