Skip Navigation

[Resolved] Issue with Imagify plugin (image compression)

This support ticket is created 6 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 9 replies, has 2 voices.

Last updated by alvaroM-5 6 years, 7 months ago.

Assisted by: Luo Yang.

Author
Posts
#690761

Hi,

I'm using Imagify, an image compression plugin (hidden link).

I've set in Imagify settings the option to compress the images automatically on the fly, as they are uploaded.

This works well with regular posts e.g. if I publish a post with 3 images these 3 images are compressed in real time when they are uploaded.

I have a CRED form which collects several images. They are uploaded correctly BUT Imagify doesn't compress them ?

There is no error message, it's just that the images are NOT compressed.

Workaround is to run a "massive compression" from time to time.

Can you check if there is any incompatibilty with Imagify for the "real time compression"?

Thanks

Alvaro

PS: in order to reproduce the issue on your side you can install the free version of Imagify (https://wordpress.org/plugins/imagify/) and upload the same image in a post and using a CRED form. You will see that the CRED form does NOT compress the image (whereas the post does), when publishing.

#690805

Dear Alvaro,

As you can see it is a compatibility problem between "Imagify" plugin and CRED plugin, please provide a downloadable URL for the "Imagify" plugin, and take a screenshot for your CRED form settings, I need to duplicate the same problem and debug it in my localhost, thanks

#695477

Thanks for the details, I am downloading the files, will feedback if there us anything found

#695520

Here are what I found:

Since I am not familiar with the plugin "Imagify" plugin, I am not sure how it works for image compression, can not find any existed workaround for your request:
Imagify for the "real time compression"

Here is the suggestion of CRED side, CRED plugin is using standard wordpress function wp_handle_upload() to handle PHP uploads in WordPress, see CRED plugin file plugins\cred-frontend-editor\vendor\toolset\toolset-common\toolset-forms\classes\submit.php, line 145:

$res = wp_handle_upload($file, $upload_overrides);

You can check it with author of "Imagify" plugin, check if it is possible to apply their filters to wordpress filter hook wp_handle_upload:
https://developer.wordpress.org/reference/hooks/wp_handle_upload/

You can also check it with our experienced contractors:
https://toolset.com/contractors/

#705296

Hi Luo,

Thanks for your tips.

Will try on the "Imagify" plugin side 🙂

Is there any other way to COMPRESS the files uploaded in CRED side? I know I can limit the size of the images uploaded, but is there any way using CRED to compress images as they are uploaded?

Thanks

PS: I'm going to open another ticket for a different small issue.

#712659

For the new question:

Is there any other way to COMPRESS the files uploaded in CRED side?

No, there isn't such a built-in feature within CRED forms, if you agree, we can take it as a feature request.

#715336

Ok Luo, we can close this one then.

And yes, please create this feature request, I think it would be extremely useful.

And, BTW, as another suggestion: meanwhile please try to make CRED compatible with the most used compression plugins (such as Imagify).

Cheers

#716939

Hi Luo,

Just got this response from Imagify:

Our plugin doesn't hook wp_handle_upload (and can't), but wp_generate_attachment_metadata, so it's possible that Toolset doesn't use it.

I've re-opened this ticket in case you have anything to say with this new info.

Thanks..

#722759

Thanks for the feedback, I have checked it with our developers, here is the feedback:
1) CRED form does not support "image compression" by default,
2) CRED form does use wordpress function "wp_generate_attachment_metadata" generates metadata for an image attachment:
https://codex.wordpress.org/Function_Reference/wp_generate_attachment_metadata
3) For the compatibility problem with "Imagify" plugin or other "image compression" plugin, it needs a feature request, our developers will evaluate it and check it.

#729117

Hi Luo,

"3) For the compatibility problem with "Imagify" plugin or other "image compression" plugin, it needs a feature request, our developers will evaluate it and check it." --> this would be GREAT 🙂

Thanks.