# Images of subcategories as data attributes in menu

URL: https://shoptet.dev/news/frontend/images-of-subcategories-as-data-attributes-in-menu

January 27, 2021 · One min read
Martin Stehlík

If there is a subcategory image set in admin, respective menu items have this image URL available in data attribute `data-image` . This allows you to implement visually richer menus in any template.

###### Example:

```html
<ul class="menu-level-2">
    <li class="menu-item-702">
        <a href="/saty-a-sukne/" title="Šaty a sukně" data-image="https://cdn-vsh.myshoptet.com/usr/step.shoptet.cz/user/categories/thumb/womens-patterned-dress-redfloral-hm-red-dresses_1.jpg">
            <span>Šaty a sukně</span>
        </a>
    </li>
    ...
</ul>
```

**Tags:**
- [Frontend](/news/tags/frontend/)
