Problem attaching file in message in mobile

Hi HivePress team,

I have noticed that when I try to attach a file (an image in this case) to a message it does not work when I am doing from mobile. I tried to upload an ~4MB image using Chrome and Safari browsers from an iPhone Xs Max but it did not work. It just hangs for a minute or more and then the image is not attached. I increase the max upload size but still not working. I tried it on my PC and it worked well with even larger files. I also checked the network performance in my phone but it is very good. Can you please help me to know what can the problem be?

I would to expand more this problem. In fact, the image (~4MB or more) is correctly uploaded to Worpress Media and it takes a short time. However, the uploading process in messages shows the loading animation for a long time and then the image is not attached and sometimes it hangs “forever”. Same thing happens when trying to upload a profile image. Can you please help me to understand the problem or how to fix since it is an important step in my website? Thank you.

Please check this topic Thumbnail image not showing | HivePress Support

Hi yevhen!

I did not understand this part of WebPie’s solution:

I found out what the problem was in the end, my client was using the “Add Media” button to add his gallery images from his phone and it was this that was causing the thumbnail not to render. So I removed the Add Media button so he has no choice now but to use the Images upload button instead, which works perfectly

Where are these buttons located? I only see “Select image” in the front end when trying to upload images (profile and messages forms). When I click on this button I have three options (IOS as example): Photo gallery, Take a Picture and Select a file. I am always using Photo Gallery where I select the image to upload but it does not work. Is there another thing that I can check? Or how can I configure this as suggested by WebPie?


Thanks for the details. Please make sure that there are no other plugins or customizations that may cause this issue, we use the native WordPress API for uploading files media_handle_upload() | Function | WordPress Developer Resources You can optimize this by disabling image sizes that you don’t need, it may take too long for WordPress to generate all the thumbnails Stop Generating Unnecessary Thumbnails – WordPress plugin |
Also, please check if this issue persists on the theme demo site. If not then this may be related to the hosting plan or other server-side settings.

Hi ihor,

I tried deactivating plugins but it is still not working. Regarding my server side settings, these are set as follow:

safe mode = Off (cannot adjust)
memory_limit = 512M
max_execution_time = 60
max_input_time = 60 
post_max_size = 516M
upload_max_filesize = 512M 
enable_dl = Off (cannot adjust)

Can these settings cause this problem? I do not think so as it works very well from my PC. My smartphone network performance is around 150Mb download and 40Mb upload.

Btw, the plugins I currently have activated are Child Theme Configurator, Code Snippets, Flexible Checkout Fields, Loco Translate, Stop Generating Unnecesary Thumbnails, Woocommerce, Woocommerce Paypal Payments, WP Mail SMTP.

I tried the theme demo site as you recommended and it worked perfectly from my mobile when uploading large images so I do not know what could be the problem with my current website configuration.

If it’s ok on the demo site then this is most likely related to the hosting environment. We use a simple $5 DigitalOcean server with LiteSpeed caching enabled, there are no specific settings or changes. Please try testing this with another hosting provider, I recommend choosing a VPS hosting with SSD - then uploading files and generating thumbnails should be much faster.
Hope this helps.

Hi ihor,

Thank you so much for your support. I will test on another hosting environment to see if that’s the problem.

Hi HivePress team,

I tested this once again on my current environment more on detail and I think I found out what is the actual problem. The problem happens when the images I try to upload have the extension in uppercase like PNG, HEIC, JPG, etc. So, when I tested this on my PC, I got an error saying only formats PNG, JPG, etc are allowed but my images have one of these formats. However, this error did not appear on my phone, it only hangs without no output. Then, I changed the extension manually to lowercase and it worked! So, I do not know if this is a bug and how can I fix it? Is there a workaround?

PS: My tests where made from an IOS device which saves all photos with names in uppercase.

Thank you in advance.

Yes, thanks for the detailed report - it is a bug. We’ll fix it in the next update, it’s planned for this week.

Great, thank you!

Is already there an update for this bug and how can I apply it?

It should be fixed now, please update HivePress and let me know if this issue persists.

Hi ihor,

All is working fine now. Thank you.