I’m working on a WordPress site that uses ACF Gutenberg blocks. I created a custom block that allows me to set the arguments for get_posts or WP_Query in the admin area. I use this block several times on the same page to display different posts. However, this makes the page load very slowly on the front-end.
In order to make the page load faster, I transformed those blocks to make an ajax request to get posts when they are in the viewport. But its not a good user experience.
How can I optimize this process and speed up the page load time without doing an ajax request?
Here is a screenshot of my block settings: