# Auto rebake match when changing category pic size

**URL:** https://meta.discourse.org/t/auto-rebake-match-when-changing-category-pic-size/105175
**Category:** Support
**Created:** [December 28, 2018, 5:24am UTC](https://meta.discourse.org/t/auto-rebake-match-when-changing-category-pic-size/105175 "2018-12-28T05:24:29Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![dylanh724](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dylanh724/32/119642_2.png) [@dylanh724](https://meta.discourse.org/u/dylanh724)
#### Post date: [December 28, 2018, 5:24am UTC](https://meta.discourse.org/t/auto-rebake-match-when-changing-category-pic-size/105175/1 "2018-12-28T05:24:29Z")

</div>

![image](https://global.discourse-cdn.com/meta/original/3X/9/d/9d98e4892188f116724b4fb55d573a07e8e36937.png)

What’s the point of having a friendly UI option if you have to spend 24~48 hours rebaking everything, unless you have advanced knowledge with rebake:match?

It seems like a pretty basic change to require pretty advanced knowledge to do. It doesn’t make much sense.

It’d be nice to just auto selective rebake specifically this image upon saving.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [December 28, 2018, 5:27am UTC](https://meta.discourse.org/t/auto-rebake-match-when-changing-category-pic-size/105175/2 "2018-12-28T05:27:33Z")

</div>

What are you suggesting? An option to rebake just a category?

A global rebake _should_ go in order of newest posts, to oldest (I’ve lectured people about this for years, so hopefully that’s the case), thus you should see the effects on the topics you care about, e.g. the recent ones, immediately. cc @techAPJ

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [December 28, 2018, 5:31am UTC](https://meta.discourse.org/t/auto-rebake-match-when-changing-category-pic-size/105175/3 "2018-12-28T05:31:30Z")

</div>

> [@codinghorror](#):
>
> hopefully that’s the case

I can confirm that is the case, as per:

[https://github.com/discourse/discourse/commit/adb93716ca7776d6f8bbf8f2680ede45fb267b4e#diff-a0e0257135a571aa3b9da75d1d9d6892](https://github.com/discourse/discourse/commit/adb93716ca7776d6f8bbf8f2680ede45fb267b4e#diff-a0e0257135a571aa3b9da75d1d9d6892)

---

<div class="post-metadata">

### Author: ![rishabh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rishabh/32/179446_2.png) [@rishabh](https://meta.discourse.org/u/rishabh)
#### Post date: [December 28, 2018, 5:48am UTC](https://meta.discourse.org/t/auto-rebake-match-when-changing-category-pic-size/105175/4 "2018-12-28T05:48:51Z")

</div>

We have a site setting called `rebake old posts count` that auto rebakes ‘X’ number of un-baked posts every 15 minutes. You can set individual posts for a background rebake like this:

- **mark a single post for rebake**

- **mark all posts for rebake**

- **mark all posts in a topic for rebake**

- **mark all posts in a category for rebake**

Running this command will simply mark the post(s) for a background rebake through the [PeriodicalUpdates job](https://github.com/discourse/discourse/blob/master/app/jobs/scheduled/periodical_updates.rb#L35) that runs every 15 minutes. You could also increase the value in the site setting for a less resource-intensive periodic rebake process.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [December 28, 2018, 5:51am UTC](https://meta.discourse.org/t/auto-rebake-match-when-changing-category-pic-size/105175/5 "2018-12-28T05:51:23Z")

</div>

The only feature suggestion I can think of is to offer a per-category rebake. Based on the code you entered above it sounds like that is possible through SQL though?

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [December 28, 2018, 6:03am UTC](https://meta.discourse.org/t/auto-rebake-match-when-changing-category-pic-size/105175/7 "2018-12-28T06:03:29Z")

</div>

As per what @rishabh suggested above category can be set for background rebake via:

```plaintext
Post.joins(:topic).where('topics.category_id = <target_category_id>').update_all('baked_version = NULL')

```

> [@codinghorror](#):
>
> offer a per-category rebake

I can add this on my low-priority list i.e. rebake task for a specific category.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [December 28, 2018, 6:04am UTC](https://meta.discourse.org/t/auto-rebake-match-when-changing-category-pic-size/105175/8 "2018-12-28T06:04:10Z")

</div>

It’s fine, as long as we have the above method via Ruby fakeSQL, that is good enough 😉

---

<div class="post-metadata">

### Author: ![dylanh724](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dylanh724/32/119642_2.png) [@dylanh724](https://meta.discourse.org/u/dylanh724)
#### Post date: [December 29, 2018, 1:05pm UTC](https://meta.discourse.org/t/auto-rebake-match-when-changing-category-pic-size/105175/13 "2018-12-29T13:05:28Z")

</div>

Hmm, I actually just rebaked and my category images **did not resize** : This is semi-related, not sure whether to make a new post for it.

We originally had ~100px category images. After an update, it stretched them to ~150px without touching any settings.

We lowered it to 100px, rebaked (took about 24 hours), and now nothing has changed:

 ![image](https://global.discourse-cdn.com/meta/original/3X/d/2/d27bed8c6e37071bd9f17fc1dae459d05eac2ee7.png)

 ![image](https://global.discourse-cdn.com/meta/original/3X/6/c/6c28932c8ef2ee3128f656fb521cd0091b19e4f3.png)

 ![image](https://global.discourse-cdn.com/meta/original/3X/7/1/71153b042bcd556cdb583bc8a96a084d1227f8a4.png)

![image](https://global.discourse-cdn.com/meta/original/3X/d/6/d6880d12b58c4eded7719cfd86c4248c4fb92635.png)

Massive, bulky icons I can’t seem to resize (smaller images just stretch and look crusty) ~

Any ideas?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [December 29, 2018, 6:51pm UTC](https://meta.discourse.org/t/auto-rebake-match-when-changing-category-pic-size/105175/14 "2018-12-29T18:51:17Z")

</div>

I think you are using an oddball plugin, because I don’t see those settings for categories here on meta?

You might try asking the author of this plugin.

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [January 1, 2019, 5:51pm UTC](https://meta.discourse.org/t/auto-rebake-match-when-changing-category-pic-size/105175/15 "2019-01-01T17:51:00Z")

</div>

These category images aren’t thumbnails, hence this setting won’t have any effect.

See: [Shrunken Category Images - #9 by pmusaraj](https://meta.discourse.org/t/shrunken-category-images/103216/9) and adapt the CSS to your needs.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [January 31, 2019, 5:51pm UTC](https://meta.discourse.org/t/auto-rebake-match-when-changing-category-pic-size/105175/16 "2019-01-31T17:51:07Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
