Jozsef Posted November 7, 2023 Share Posted November 7, 2023 I love ProcessWire and I've been using it almost exclusively for the last 8 years. One thing that has never improved though is how the page loading is blocked while waiting for ALL images to be resized in the frontend. This is ok for a basic page with a single hero image and another 2-3 in the content but is seriously problematic for gallery pages or sites with loads of images. First page load can be incredibly long, or potentially time out. Would it not be much more user friendly if the page would display and images would appear when they are available in the requested size? I came from Drupal 7 where this was the normal behaviour, it was a shock with ProcessWire and unfortunately this is still the case. Is there a technical reason why it MUST be like this? While ideally this would be a feature in the core, what workaround do you all use to display the html/css/javascript while images are getting resized? Is there a module I've missed before? 1 Link to comment Share on other sites More sharing options...
szabesz Posted November 7, 2023 Share Posted November 7, 2023 Hello, Maybe this thread can help as a starting point: Link to comment Share on other sites More sharing options...
Jozsef Posted November 7, 2023 Author Share Posted November 7, 2023 Thanks @szabesz, I'm aware that it's possible but I don't want to pre-generate all image sizes for all images automatically. For example Drupal 7 resizes images on the fly too, based on image presets, yet the page displays and images load as they are generated. I am just hoping that it's possible to achieve something like this in template files. 2 Link to comment Share on other sites More sharing options...
Stefanowitsch Posted November 8, 2023 Share Posted November 8, 2023 I know this behaviour and it bothers me on every project. I always get a 500 time out error when loading loads of images the first time. This happens mostly in my local dev environment, though. The live server seems to be powerful enough to handle it faster without the timeout. Link to comment Share on other sites More sharing options...
ngrmm Posted November 8, 2023 Share Posted November 8, 2023 I'm curious and would like to know how the Drupal way handles the problem of layout shifts if images and image dimensions are not available on load? Link to comment Share on other sites More sharing options...
Jozsef Posted November 8, 2023 Author Share Posted November 8, 2023 31 minutes ago, ngrmm said: I'm curious and would like to know how the Drupal way handles the problem of layout shifts if images and image dimensions are not available on load? Dimensions are available since they are based on image presets and Drupal includes width and height attributes I believe. We can do the same in ProcessWire but the page is not even sent until all the images in the template got resized that can take minutes for a gallery page. When including links to larger image variations, even images in the links get resized before the page can load even though they are not displayed immediately and could wait until someone clicks the link. Link to comment Share on other sites More sharing options...
Robin S Posted November 10, 2023 Share Posted November 10, 2023 A module for you guys... 4 Link to comment Share on other sites More sharing options...
Jozsef Posted November 10, 2023 Author Share Posted November 10, 2023 10 minutes ago, Robin S said: A module for you guys... @Robin S, thank you very much, that is such a nice gesture of you. I'll try this right away. ? 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now