Skip to content

How to change an image used in template for magento 2.2.6

My template includes a background image on the front page that’s unnecessarily huge. I’ve created a resized, tinyfied version of the same image but I can’t figure out how to change it. Can anyone help?

I swapped what I thought was the image file being used, but nothing has changed. I changed it in /public_html/pub/static/frontend/mycustomtheme/default/en_GB. I found the same image file located in /public_html/app/design/frontend/mycustomtheme/default/web/images/template and changed that too. Then I cleared the layout, block and page cache, and my browser cache, but nothing changed.

The website is in production mode, and it’s pretty vital that I don’t break it. I don’t want to have to send this back to the company that built the template for me either, that would end up with a massive bill attached. Plus they’re the ones that used the giant image file in the first place. There’s a few other images I need to replace but those are located in areas accessible by the wysiwyg editor. I have other changes I’d like to make to the way the site displays on mobile but I’m starting to think this might not be practical – I thought changing the image out would be the easy bit!

Is there a straightforward way for me to change this myself?