Why do tons of images in the static folder slow down the site?

Hi, I am creating an open access manuscript preservation site. It has tons of scanned images and some commentary about them. Since I added a lot of them, the site has been loading very slow. https://jayapatakaswami.gitlab.io/gaudiya/gaudiya/

Any thoughts how can I fix this? Is Hugo not the right platform for this type of task?

What you mean is that the site creation is slow. I would look into the first four templates in that list. Something is going on there and it’s going on 800 times :wink: It’s probably something you can work on by using partialCached instead of partial.

But I am using Learn theme and haven’t modified any of those four templates. My point is that I am not doing anything complicated or custom. It is plain website with an image per page.

btw here is the repo: https://gitlab.com/jayapatakaswami/gaudiya

there are a lot stacked range expresssions in MENU and FOOTER.
Comment ist out and check what happens

First of all happy birthday :slight_smile:

I am guessing that by stacked range expressions you meant nested range expressions. Footer only had one range expression and the menu’s nested range was off because they are turned on only for multilingual stuff. Anyway I removed those. Nevertheless the performance is still the same.

Is there any other theme which is good for performance?

You hav two templates that slow things down.

  1. partial/menu.html
  2. partial/footer.html (the navigation part)

Removing all the code in them and the site builds in 1,3s instead of almost 13s on my system.

To speed up your site you need to optimise the code in does templates or use another theme.

1 Like

Thank you frjo.

I understand the templating better.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.