Allow uploading HEIC

Uploading media via hivepress is extremely difficult.. You need to know almost half of thr population uses iphones .. Why would you limit mov videos and HEIC images to only .. Customers complain alot.. personally i have to always convert videos to mp4 or images to png/jpg before uploading on my site.. If there is any code to bypass this pain please produce it .. Thank you

Even uploading the accepted video and image formats sometimes takes forever to upload.. they sometimes too give error messages ..
My wordpress upload size is 350m and execution time is around 300secs.. so why this pain ? :sob::sob::sob:

Hi @stgarena,

According to the HivePress AI, you can try using the following snippet to allow additional file types:

add_filter(
'hivepress/v1/models/listing',
function( $model ) {
$model['fields']['images']['formats'][] = 'mov'; // Replace 'mov' with your desired format
return $model;
},
100
);

The AI also said:

Important notes:

  • Replace ‘mov’ with the file extension you want to allow (e.g., ‘heic’, ‘gif’, etc.)
  • Most browsers don’t natively support all formats (like .mov), so videos may not play directly
  • This allows HivePress to use file formats that WordPress functions support
  • For iPhone users, .mov files are typically auto-converted to .mp4 during upload
    For Video Files

Key Factors Affecting Upload Speed

  1. Server & Hosting Settings:

Server specifications (CPU, RAM, storage type - NVMe SSD is faster)
max_execution_time PHP setting (how long scripts can run)
Server file writing speed
Hosting provider limitations and restrictions
Server location
2. Image Processing:

Image processing module - This is a common culprit! One user found that switching from ImageMagick to GD module increased upload speed by 3 times
WordPress creates multiple image sizes/thumbnails during upload, which takes time
File format and size
3. Website-Level Factors:

Number of existing database entries
Third-party plugins and customizations
Caching settings (should be disabled for logged-in users)
Internet connection speed
4. Important Note:

HivePress uses core WordPress functions ( wp_handle_upload ) for uploading
The plugin itself doesn’t control or limit upload speed
Backend WordPress uploads are typically faster than frontend because there’s less processing involved
Common Solution
If you’re experiencing slow uploads, the most effective fix reported by users is:

Switch from ImageMagick to GD module for image processing (this dramatically improved speed for several users)
Increase the max_execution_time PHP setting via your hosting provider
Check with your hosting provider about any server limitations

I hope this helps!

Cheers,
Chris :victory_hand:

Hi,

The snippet provided by Chris allows uploading .heic files. However, please note that most browsers do not natively support displaying .heic images or .mov videos, so they won’t appear directly in the browser. For mobile devices, iPhones should automatically convert .heic files to .jpg during upload and .mov to .mp4.

Regarding upload time, HivePress uses the default WordPress upload functionality, there is no custom HivePress function for this. Please ensure that your image or video file size is not too large, as this can affect upload speed and success.

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