Images taking a long time to load

The images on my site are taking a very long time to load on several listings search pages. This issue seems to mainly be with Chrome and Mozilla; Safari seems to work correctly.

I have a quick video showing the slowness if you can provide an email address to send the video to.

You can also go to this page as an example and see if it happens on your end as well: You searched for | Page 490 of 1459 | Retirement Being

As a side note, the site scores well on PageSpeed Insights and GTMetrix.

Moreover, I’ve spoken with my host about this issue and they don’t see anything that could be causing it on their end. I’ve had this site hosted with two hosts and the same issue occurred with each.

Hi,

We use this core WordPress function for uploading files media_handle_upload() | Function | WordPress Developer Resources It’s speed depends on third-party plugins, customizations, server limitations, existing content, etc. You can check the full source code here hivepress/class-attachment.php at master · hivepress/hivepress · GitHub Checking why it’s slowed down is possible, but requires some research (e.g. logging all the functions that run during the request and which one takes too long).

P.S. If I haven’t asked already, please let me know if we can add your website to the Showcase Showcase | HivePress

1 Like

Thanks, Ihor.

You can add my site to the HivePress showcase. I appreciate it.

1 Like

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

Dear,

We are experiencing very slow image upload speeds on both profile and listing images, we’re on a VPS with 6 cores, 8GB of ram and a NVMe ssd and the website is not that big yet.

We’ve looked over all our server settings and they appear to be correct for our situation, but whenever we upload an 1MB image ( which is not that big) it takes almost 15 - 20 seconds before it’s processed. The thing is we do see the image already uploaded in the media library, while the front-end is still loading 10+ seconds. Also in the wordpress back-end the same file is uploaded within 3 seconds.

I’ve added some debug statement to the upload attachement function and found out the following:

[20-Nov-2024 21:29:55 UTC] [Timing] Start upload_attachment.
[20-Nov-2024 21:29:55 UTC] [Timing] Parent model created: 0.00078988075256348 seconds
[20-Nov-2024 21:29:55 UTC] [Timing] Parent object fetched: 0.0023097991943359 seconds
[20-Nov-2024 21:29:55 UTC] [Timing] Parent field fetched: 0.0024478435516357 seconds
[20-Nov-2024 21:29:55 UTC] [Timing] Starting file upload: 0.019221782684326 seconds
[20-Nov-2024 21:30:31 UTC] [Timing] File uploaded: 36.21294093132 seconds
[20-Nov-2024 21:30:31 UTC] [Timing] Attachment processed and saved: 36.23185300827 seconds

What could possibly explain the high upload time and what can we do to make it better?

We also have the problem that if the user uploads for example an 15MB image and the limit is 8MB we get an unauthorized error instead of just the max file size? I’ve also seen this in the demo shop happening, but this way the user has no feedback on what is going wrong.

Thank you in advance!

Hi,

Please check this topic.

For someone else that has this problem, the problem was the imagick module had a lot of trouble with handling all the creation of all the other image sizes, we’ve changed from imagick to the GD module and it’s increase the speed by 3 times now.

2 Likes

Hello

I have a problem with the offer page. The problem starts when registering the ad. When a client adds an offer and adds a photo, the photo keeps loading and cannot load. Only when I refresh this form does the loaded photo appear. The same problem occurs later on the offer page. When I enter an offer from the list, the offer appears without a photo. Only after refreshing the page does the offer photo appear. So the first loading of the photo and the first entry to the offer page does not show the photo. It only appears after refreshing the page. What could be the problem?

Hi,

Please check this topic.

Only my problem seems to be different because it is not about slow loading of graphics but their lack of display without refreshing the page. Graphics both when loading and opening will not load at any time until I refresh the page and this happens in every browser

Hi,

I see. Please disable third-party plugins and customizations (if there are any) and check if this issue persists. If you use a caching plugin, make sure that caching is disabled for logged-in users. If this issue exists, please send temporary WP access to support@hivepress.io with details for reproducing this issue, and we’ll check it (please send only the link, without login and password). You can create a temporary access link using this plugin: Temporary Login Without Password – WordPress plugin | WordPress.org.

I sent you an access link to your email. I checked the plugins. I turned off the ones I installed myself and unfortunately that didn’t help. When you first enter the site you can’t even see that there’s a photo here. The field is empty, only after refreshing does the photo appear and similarly in the offer registration form. It loads there but doesn’t show the photo until I refresh the page. Please check what happened on the site. Thank you very much for your help

Hi,

Unfortunately, there is no link to the temporary access in the email, please try sending it again.

I sent it again

Hi,

Unfortunately, we were not able to reproduce the issue; all images were uploaded and displayed correctly. Please provide more details regarding this issue (e.g., your actions step by step with screenshots, screencast, etc.). This will help us to reproduce and resolve the issue faster.

So when you entered the offer, a photo was displayed immediately? hmmm. I’ll record a video of how it looks

I sent you a recording of the problem with photos to your email. It works when you register, but it still occurs when you enter the offer

I will add an important comment. If you added a photo and entered the offer in the same session, it works. Add a photo and then close the page and enter again in a new session or in a different browser. Then it will not work. The first launch of the offer shows that the photo is not there. Only after refreshing does it appear and then subsequent entries in this session work. If you enter the page again, the first entry does not display the photo

Thanks for the details. I’ve just replied via email - this issue occurs because of the RentalHive-specific image gallery design, it causes issues if used inside a fixed-width container rather than a full-width one.