# Help with category background images

**URL:** https://meta.discourse.org/t/help-with-category-background-images/104709
**Category:** Support
**Created:** [December 19, 2018, 9:01pm UTC](https://meta.discourse.org/t/help-with-category-background-images/104709 "2018-12-19T21:01:06Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Jason3](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jason3/32/125743_2.png) [@Jason3](https://meta.discourse.org/u/Jason3)
#### Post date: [December 19, 2018, 9:01pm UTC](https://meta.discourse.org/t/help-with-category-background-images/104709/1 "2018-12-19T21:01:07Z")

</div>

what size background image works best? I have tried over 100 images and gifs, and they all get stretched, and blurry. usually 1/2 the image isn’t even viewable

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [December 19, 2018, 9:26pm UTC](https://meta.discourse.org/t/help-with-category-background-images/104709/2 "2018-12-19T21:26:21Z")

</div>

You’re going to want something fairly large in dimension and in a landscape orientation (but watch out for file size too, you don’t want to force everyone to download a huge image).

For example, I accidentally took this photo of my couch. The dimensions are 1920 x 1440 and it fits my screen as a background image (text is unreadable over it, but that’s a separate issue).

 ![IMG_0782](https://global.discourse-cdn.com/meta/original/3X/7/b/7bca050049a05c76275bceefb02bf9388703e3d9.jpeg)

Note that the image is set to `background-size: cover;` by default — so this means that the image will be scaled-up to fill the entire browser window without repeating the image (and likely cropped somewhat unless my window is in the same 4:3 ratio as the image). Small images will be sized up proportionately until they fit the entire window. You can change this behavior using CSS for the category, for example:

```plaintext
body.category-example {
  background-size: 25%:
}

```

Now your background image is much smaller, and tiled to fill the screen.

You’ll want to work with [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size), [background-repeat,](https://developer.mozilla.org/en-US/docs/Web/CSS/background-repeat) and [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position) in your site’s CSS to find out which properties will work for your specific image.

---

<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 20, 2018, 12:59am UTC](https://meta.discourse.org/t/help-with-category-background-images/104709/3 "2018-12-20T00:59:28Z")

</div>

> [@awesomerobot](#):
>
> You’re going to want something fairly large in dimension and in a landscape orientation

Can we add this tip to the UI for the feature, somewhere?

---

<div class="post-metadata">

### Author: ![Jason3](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jason3/32/125743_2.png) [@Jason3](https://meta.discourse.org/u/Jason3)
#### Post date: [December 20, 2018, 3:18am UTC](https://meta.discourse.org/t/help-with-category-background-images/104709/4 "2018-12-20T03:18:34Z")

</div>

> [@awesomerobot](#):
>
> You can change this behavior using CSS for the category, for example:
> 
> ```plaintext
> body.category-example {
> 
> ```

i dont see anywhere under the category where CSS is.

 ![image](https://global.discourse-cdn.com/meta/original/3X/3/3/333e14ff977e9621826b60658483847e8bbb39f7.png)  
or am i looking in the wrong places?

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [December 20, 2018, 3:26am UTC](https://meta.discourse.org/t/help-with-category-background-images/104709/5 "2018-12-20T03:26:10Z")

</div>

All of your CSS is controlled under `admin > customize > themes`, by “CSS for the category” I meant that you can target a specific category because we add CSS classes to the page when relevant.

So in the case of a category named “Other” we add the `.category-other` class to the page’s body tag, so you can use something like this in your general customizations to target that specific category.

```CSS
body.category-other {
  // your CSS for the category here
}

```

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [March 2, 2020, 7:56pm UTC](https://meta.discourse.org/t/help-with-category-background-images/104709/8 "2020-03-02T19:56:58Z")

</div>

What is a recommended size for Category background say width?

Also looking for recommended sizing for doing a Category Image.

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [March 2, 2020, 8:26pm UTC](https://meta.discourse.org/t/help-with-category-background-images/104709/9 "2020-03-02T20:26:22Z")

</div>

Both vary a lot based on what effect you’re trying to achieve…

For background images… probably as wide as you can get while keeping the file size reasonable (say maybe under 150k or so? a service like [https://tinypng.com/](https://tinypng.com/) can help reduce filesize). Probably in the range of 1440px - 1920px wide…

For category logos/images I personally like squares, around 150px or so… but if you’re customizing the layout otherwise really any size/orientation can work well.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [March 2, 2020, 8:28pm UTC](https://meta.discourse.org/t/help-with-category-background-images/104709/10 "2020-03-02T20:28:36Z")

</div>

> [@awesomerobot](#):
>
> a service like [https://tinypng.com/](https://tinypng.com/) can help reduce filesize

Since there are some limitations with this website, I sometimes use [https://pngquant.org/](https://pngquant.org/). It has an executable and will do the same job without these limitations, and I think it uses the same compression method.

---

<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: [February 14, 2024, 7:36am UTC](https://meta.discourse.org/t/help-with-category-background-images/104709/11 "2024-02-14T07:36:46Z")

</div>



---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [April 16, 2024, 12:04pm UTC](https://meta.discourse.org/t/help-with-category-background-images/104709/12 "2024-04-16T12:04:24Z")

</div>


