Hi,
I have launched my company website on ICP, KHVM AI & Web3 Consulting ApS, but the images that I put in a background wrapper are really slow to load. I don’t really want to make a big announcement about how my website is running on ICP on LinkedIn with that kind of latency.
Anyone have a clue what might remediate this? The images are png and between 1 and 3 mb. Is that too much?
Kind regards
Kenneth
Yes
Note that this isn’t specifically related to the IC; it would be the same on a Web2 hosting platform. Generally speaking, if you load an image upfront, I suggest optimizing it as much as possible. In addition to reducing its size, you can also try formats other than PNG to see if it improves performance.
Just to give you an idea—on the Juno website, I recently added a screenshot that loads upfront. It’s a 96kb webp image, and honestly, I’m far from pleased with it . If I could, I’d definitely aim for something even smaller!
3 Likes
Thanks for the answer! This is the first time I am deploying a website, so didn’t really know what to expect. I guess I should try to re-design it a bit
1 Like
There are also tools that can help with images. For example this one https://compressor.io/ would already compress your main image by half of its size. Hope that helps!
1 Like
I actually just ended up putting the images in an <img src="images/… class=“background-image”> thing directly in the HTML and it works pretty smoothly imo. Before I had the images as URLs in CSS.
You can try it here: aiweb3consult.dk
/Kenneth
1 Like
The image ai_flowing_into_graph.jpg
is also 10 times lighter, that helps too .
Great job
1 Like
tinypng.com is good too for optimizing images. It shaved 20% offf the file size - I’ve emailed it to you…
Also, you might want to use cover for the css on the image, I think it’ll look better (you’ll see the whole image)