Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • ridvanay, hi there.

    For this kind of stuff, your best bet is to: a) downscale the HQ images first; b) stick to a 60-80% compression range so the image doesn’t look like a colored mess; c) rethink your current architecture.

    So far, dropping the quality by 5% step over and over in a while loop is a huge resource waste. Plus, processing everything (especially heavy files) “on the fly” during the request is a bad practice. It makes way more sense to split the upload routine and optimization logic. That way, the file uploads instantly, and the optimization routine happens in the background. I think it’s reasonable to ditch wp_handle_upload and switch to something like wp_generate_attachment_metadata + WP Cron (a system cron job would be even better, thought it takes some extra setup) or Action Scheduler.

    mathancbra, hi there.

    First of all, I’m sorry to hear that you’re faced such a problem. Also, I want to ask you about the log files, have you checked them? In this case, 30+ websites and their logs are a huge amount of data, so you can try to extract some useful information from them.

    echarlewebs, their response time to such cases is very slow, so it’s better to look for an alternative solution.

Viewing 3 replies - 1 through 3 (of 3 total)