Skip to main content
Solved

New error page - how to change the image here?

  • July 18, 2024
  • 19 replies
  • 252 views

revote
Forum|alt.badge.img+2
  • VIP ⭐️⭐️⭐️⭐️⭐️

I havent seen this image before. Problem is that it doesn´t follow our brand guidelines.

How to change it?

 

Best answer by Kenneth R

Hey @revote - I might still get a better answer, but here is an approach I was just able to validate as workable in our staging environment.  This simple bit of CSS will simply swap the image out:

img[src="https://d3qhpmzl5oynt5.cloudfront.net/2024-07-18-13-25-05-b733e7f227/dist/images/errors/404.png"] {
content: url('https://via.placeholder.com/404'); /* URL of the new image */
}

 

19 replies

Kenneth R
Forum|alt.badge.img+5
  • Expert ⭐️⭐️
  • July 18, 2024

Hi @revote !  We hadn’t missed your question about this in the phrases thread - sorry we haven’t been able to get you an answer yet.  I’ve been through all of our hidden phrases and also can’t find a phrase for this image.  I’m still looking for an answer.  As a last resort I expect it’s potentially possible to have a bit of third-party script code that ‘swaps’ the image for something else.  But let me chase some more for you.


revote
Forum|alt.badge.img+2
  • Author
  • VIP ⭐️⭐️⭐️⭐️⭐️
  • July 18, 2024

Nice, thanks @Kenneth R. I am looking forward 😊


Kenneth R
Forum|alt.badge.img+5
  • Expert ⭐️⭐️
  • Answer
  • July 18, 2024

Hey @revote - I might still get a better answer, but here is an approach I was just able to validate as workable in our staging environment.  This simple bit of CSS will simply swap the image out:

img[src="https://d3qhpmzl5oynt5.cloudfront.net/2024-07-18-13-25-05-b733e7f227/dist/images/errors/404.png"] {
content: url('https://via.placeholder.com/404'); /* URL of the new image */
}

 


revote
Forum|alt.badge.img+2
  • Author
  • VIP ⭐️⭐️⭐️⭐️⭐️
  • July 18, 2024

Thanks a lot @Kenneth R, I’ll test this. Hopefully there will be other/better solution in the future but I think we can use this by now 🙂


revote
Forum|alt.badge.img+2
  • Author
  • VIP ⭐️⭐️⭐️⭐️⭐️
  • July 19, 2024

It seems there is new 403 image as well.

I hope that when you renew your platform, no matter how less or much, you send info & instructions to your customers. Thanks 😊

 


revote
Forum|alt.badge.img+2
  • Author
  • VIP ⭐️⭐️⭐️⭐️⭐️
  • July 19, 2024

Hey @revote - I might still get a better answer, but here is an approach I was just able to validate as workable in our staging environment.  This simple bit of CSS will simply swap the image out:

img[src="https://d3qhpmzl5oynt5.cloudfront.net/2024-07-18-13-25-05-b733e7f227/dist/images/errors/404.png"] {
content: url('https://via.placeholder.com/404'); /* URL of the new image */
}

 

I added this code to our sandbox but your image remains. I replaced the source image url and new image url as well. Any ideas?


The image `src` attribute value will not necessarily be the same across communities/users.
 

@revote I was able to get the above css idea to work by changing the selector to:
.destination_error_image[src*="404.png"] {

  content: url("https://via.placeholder.com/404");

}


And, I’m assuming this should work for the 403:
.destination_error_image[src*="403.png"] {

  content: url("https://via.placeholder.com/404");

}


Kenneth R
Forum|alt.badge.img+5
  • Expert ⭐️⭐️
  • July 22, 2024

Hey @revote - I might still get a better answer, but here is an approach I was just able to validate as workable in our staging environment.  This simple bit of CSS will simply swap the image out:

img[src="https://d3qhpmzl5oynt5.cloudfront.net/2024-07-18-13-25-05-b733e7f227/dist/images/errors/404.png"] {
content: url('https://via.placeholder.com/404'); /* URL of the new image */
}

 

I added this code to our sandbox but your image remains. I replaced the source image url and new image url as well. Any ideas?

 

Hey @revote - I’m going to DM you so I can take a look with you on your sandbox.  :)


Kenneth R
Forum|alt.badge.img+5
  • Expert ⭐️⭐️
  • July 22, 2024

And just to close the loop here, the CSS code above worked but we needed to update the URL of the standard 404 image as it wasn’t the same as in the environment I tested.  :)


revote
Forum|alt.badge.img+2
  • Author
  • VIP ⭐️⭐️⭐️⭐️⭐️
  • July 22, 2024

And just to close the loop here, the CSS code above worked but we needed to update the URL of the standard 404 image as it wasn’t the same as in the environment I tested.  :)

Yeah, I can confirm, works now ok. Thanks @Kenneth R 

I think I was using correct url´s, with sandbox site sandbox url´s 😀


revote
Forum|alt.badge.img+2
  • Author
  • VIP ⭐️⭐️⭐️⭐️⭐️
  • July 24, 2024

Hmm, it seems that url of the original error image keep changing and that´s why this workaround works only until url the changes. It seems that url changes 1-2 days period.

Any ideas @Kenneth R?

 

EDIT: We can use the error page without error images, if it is easier?


revote
Forum|alt.badge.img+2
  • Author
  • VIP ⭐️⭐️⭐️⭐️⭐️
  • July 24, 2024

The image `src` attribute value will not necessarily be the same across communities/users.
 

@revote I was able to get the above css idea to work by changing the selector to:
.destination_error_image[src*="404.png"] {   content: url("https://via.placeholder.com/404"); }


And, I’m assuming this should work for the 403:
.destination_error_image[src*="403.png"] {   content: url("https://via.placeholder.com/404"); }

Yep, with this solution it doesnt matter even the source url keep changing during the time.

Thanks.


Laurenseife

Hey @revote @Kenneth R, can I bug to ask you WHERE you load the CSS to swap out the image. Sorry, basic newbie question! 


revote
Forum|alt.badge.img+2
  • Author
  • VIP ⭐️⭐️⭐️⭐️⭐️
  • September 24, 2024

Hey @revote @Kenneth R, can I bug to ask you WHERE you load the CSS to swap out the image. Sorry, basic newbie question! 

Here.

Note: Test code in your testing site before adding code to your live community.

 

 


revote
Forum|alt.badge.img+2
  • Author
  • VIP ⭐️⭐️⭐️⭐️⭐️
  • September 24, 2024

I´ll add this hint to this topic as well. In cases if you want to hide image, not to change it to another:

 

you can set the default 404 and 403 images to not show with this bit of CSS:

.destination_error_image[src*="404.png"],
.destination_error_image[src*="403.png"] {
display: none;
}

 

 


Laurenseife

@revote WOHOOOOO It worked. Thanks so much for the guidance!!! 


revote
Forum|alt.badge.img+2
  • Author
  • VIP ⭐️⭐️⭐️⭐️⭐️
  • September 24, 2024

@revote WOHOOOOO It worked. Thanks so much for the guidance!!! 

Glad to help 👍


  • Contributor ⭐️
  • June 4, 2025

Hi ​@Kenneth R!

I’ve been trying to replace the image, and I followed your instructions (and updated the Gainsight image link: https://dowpznhhyvkm4.cloudfront.net/2025-06-03-13-07-50-469ca4191e/dist/images/errors/404.png), but it keeps showing the error. 

Unknown CSS property "https" (line: 42, char: 59)
Unterminated "property content" (line: 43, char: 1)

Could you help? :)


Kenneth R
Forum|alt.badge.img+5
  • Expert ⭐️⭐️
  • June 11, 2025

Hi ​@Petra P - I had a quick look at your community but don’t see any CSS there.  Or were you testing on sandbox?  Happy to take a look - let me send you a PM.  :)