Skip Navigation

[Resolved] Types / Cred + WP Smush

This support ticket is created 7 years, 6 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 3 replies, has 2 voices.

Last updated by Nigel 7 years, 6 months ago.

Assisted by: Nigel.

Author
Posts
#525896

I am trying to:
Upload images in a Cred form

I expected to see:
I'm using the extremely popular and rather standard WP Smush plugin to keep a hold of image sizes and compression. It works fine EXCEPT uploading from the cred form.

The image uploads, smush works, everything works - EXCEPT:

The link in the post created is to the original file, not the file that smush makes. This is not whate happens when using the rest of the system.

Is there anything we can do to get this integration to work properly?

#526081

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Scott

I tested this myself with the WP Smushit plugin and found that, yes, they work together side by side (there isn't a compatibility conflict as such), but, no, images that are uploaded via a CRED form do not trigger the Smushit compression in the same way they would if uploaded in the WP back-end.

As such I'll handle this as a feature request, which means proposing that CRED trigger WP Smushit if installed to our developers. They are busy with the current CRED release, but when we hear whether the request is accepted we'll post a message here.

#526210

Hi Nigel,

Thanks for the thoughtful response. I like the fact that Smush seems to do the job of both EWWW (Compression) and Imsanity (image pixel size) combined, rather than using 2 plugins... Offhand, do you know if CRED works with these as a stopgap?

The problem is I'm having costumers uploading images that are anywhere from sane (under 150kb), to crazy 3-5 MB, and really insane (10 or more MB!) and then later the site gets hung up trying to show these images on pages. Of course it's impossible to teach users what the meaning of KB or MB means (sigh...).

If you have any other suggestion that currently works I'd love to hear it!

#526220

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Scott

Well, regarding the WP Smush plugin, I would see if it can be triggered programmatically, in which case you could use the CRED API to run a code snippet when the form was submitted which triggered WP Smush processing the image which had been uploaded by the file.

You might want to nosey around in their codebase or just ask on their forums if there is a function (there must be!) you can use to run WP Smush on a particular image.

The other point about your users uploading huge images is well understood.

Logically you would resize the images before they are uploaded to save bandwidth (I did this once on a project of my own using HTML Canvas and it was a lot of work), but it's not something that many—or possibly any—WordPress posting solutions offer.

But, while you might not be able to prevent users from uploading oversized files, you can be sure to always specify the size required of images you are using on the front end, and never use "Full size". Work out what the maximum image size you might require is and be sure that that size is registered, so that WordPress will automatically make it (and smaller versions) that you can use in place of the original.

(Try googling "wordpress theme register image sizes".)