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?

1 Answer 1


Run these commands in the magento root in the terminal to update your frontend:

rm -rf src/var/cache/ src/var/page_cache/ src/var/view_preprocessed src/pub/static/frontend;

bin/magento setup:static-content:deploy
  • Thank you for that, I think this is beyond me at the moment.
    – Bella
    Aug 13, 2022 at 13:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.