# How to change the image when the menu collapses

**URL:** <https://community.weweb.io/t/how-to-change-the-image-when-the-menu-collapses/7069>\
**Category:** How do I?\
**Tags:** weweb\
**Created:** [February 16, 2024, 4:08pm UTC](https://community.weweb.io/t/how-to-change-the-image-when-the-menu-collapses/7069 "2024-02-16T16:08:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![GSr](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/gsr/32/7506_2.png) [@GSr](https://community.weweb.io/u/GSr)\
**Post date:** [February 16, 2024, 4:08pm UTC](https://community.weweb.io/t/how-to-change-the-image-when-the-menu-collapses/7069/1 "2024-02-16T16:08:08Z")

</div>

I need the current image to be changed to another image when the menu collapses, how could this be done?

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/d/d7ee3f329da6a427afcdcc0d08fc6fd64fe6e233.png)

![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/8/818e75bbc1fc76041aabd64f4f48434e74bc3b1b.png)

---

<div class="post-metadata">

**Author:** ![rayanenocode](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/rayanenocode/32/13166_2.png) [@rayanenocode](https://community.weweb.io/u/rayanenocode)\
**Post date:** [February 16, 2024, 5:40pm UTC](https://community.weweb.io/t/how-to-change-the-image-when-the-menu-collapses/7069/2 "2024-02-16T17:40:54Z")

</div>

I guess your using a variable for this ? Like “Menu is collapsed? = yes or no” And so the source of your image has to be :

If(“Menu is collapsed?=yes”,“theimagewhencollapsed.png”,“theimagewhennotcollapsed.png”)

The ‘if’ formula will say when the first condition is true return value1 if not return value2

---

<div class="post-metadata">

**Author:** ![GSr](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/gsr/32/7506_2.png) [@GSr](https://community.weweb.io/u/GSr)\
**Post date:** [February 16, 2024, 6:06pm UTC](https://community.weweb.io/t/how-to-change-the-image-when-the-menu-collapses/7069/3 "2024-02-16T18:06:16Z")

</div>

Could you make a video demonstrating how to do this?

---

<div class="post-metadata">

**Author:** ![rayanenocode](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/rayanenocode/32/13166_2.png) [@rayanenocode](https://community.weweb.io/u/rayanenocode)\
**Post date:** [February 16, 2024, 6:23pm UTC](https://community.weweb.io/t/how-to-change-the-image-when-the-menu-collapses/7069/4 "2024-02-16T18:23:05Z")

</div>

Yep
