imagify-plugin icon indicating copy to clipboard operation
imagify-plugin copied to clipboard

Provide more accurate and descriptive image optimization error messages

Open joejoe04 opened this issue 4 years ago • 6 comments

cURL error 28 / timeouts during optimization often cause an error message that users are out of credit/quota.

This can often cause them to frustrated because they either should have unlimited quota or should still have plenty left.

Can also cause the users to upgrade their subscription and to become even more frustrated when that doesn't work either.

Potential Solution Provide more accurate and descriptive error messages depending on what exactly is causing the errors.

joejoe04 avatar Mar 17 '21 13:03 joejoe04

Some further explanation: https://wp-media.slack.com/archives/G045P1RA2/p1638565375003000

piotrbak avatar Dec 05 '21 17:12 piotrbak

Cannot reproduce. Tried spoofing a cURL errors and forcing timeouts, and returning various WP_Errors from the Imagify User class, but was only able to get (1) the appropriate "Our server returned an invalid response" message or (2) the optimize breaks without returning any message at all.

iCaspar avatar Dec 06 '21 20:12 iCaspar

Per slack conversation: Seems that the way to reproduce it is: Small WP memory limit (40M) 30s PHP timeout Server using Imagick Try to optimize a lot of larger images (2MB+), especially when your site has a lot of thumbnails defined (props to @markonikolic985)

iCaspar avatar Dec 07 '21 13:12 iCaspar

@piotrbak @joejoe04 What can be the different messages to display?

GeekPress avatar Oct 21 '22 15:10 GeekPress

@GeekPress Not sure what kind of errors can we expect there further, but starting from having two separate errors sounds like a good idea:

  1. For out of quota
  2. For the timeouts

For the timeout, we could have the following:

The operation timed out while processing your image. Please try again, if the problem still exists, please check our documentation for possible solutions: https://imagify.io/documentation/optimization-is-stuck/

piotrbak avatar Oct 24 '22 11:10 piotrbak

I agree with @piotrbak that 2 primary ones are for out of quota and timeouts, though I think it could also be helpful if the error messages could also distinguish between timeouts and 403s (whether blocked by security plugins, firewall, HTTP authentication, etc). If so, we could offer more accurate advice about what needs to be checked.

The biggest issue in my opinion (and the reason I remember opening this issue) is that sometimes when timeouts occur, it causes the "Out of quota" message to show to the users. That really upsets some people because they have ordered the Infinite plan and then suddenly they're told they are out of quota, when the issue is really something else (cURL error 28, etc).

I believe Caspar had checked into why this happens just before he left. I don't know why it happens, but I remember he said it was a bit complicated.

joejoe04 avatar Oct 24 '22 20:10 joejoe04