Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve page load speed #24

Open
britzl opened this issue May 13, 2020 · 2 comments
Open

Improve page load speed #24

britzl opened this issue May 13, 2020 · 2 comments

Comments

@britzl
Copy link
Collaborator

britzl commented May 13, 2020

https://developers.google.com/speed/pagespeed/insights/?url=www.defold.com

@mikatuo
Copy link
Contributor

mikatuo commented Dec 20, 2022

image

I can help with the load optimizations.

  1. Add lazy loading. vanilla-lazyload or lazysizes will work great, they both can also lazy-load background images that you use for full game images.
  2. At least convert home page png and jpg to webp using Squoosh CLI, then replace their <img> elements with <picture> element with <source type="image/webp"> and <img> fallback for older browsers. I have no experience with Jekyll but it seems to be possible to add a Jekyll template for it, right? Then will be easy to replace a few <img> with <picture>.
  3. The webp > png fallback is not possible for background images (full game images). They will stay. If you want them to be compressed (webp is >10x smaller than png) then to support older browsers the background CSS images need to be refactored into <picture> elements.

The 2 is related to #15. It might be possible to use webp>png/jpg without the automation first, possibly with a template file and https://devopsx.com/jekyll-check-if-file-exists/ . If there is no .webp for the image then render a single <img>, otherwise, render the <picture> element with webp and png/jpg.

@britzl
Copy link
Collaborator Author

britzl commented Dec 27, 2022

  1. Add lazy loading

This is a really good suggestion! I'm going to try this!

2. At least convert home page png and jpg to webp

Yep, moving to webp will definitely improve page load times!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants