Takis Bouyouris on "[Plugin: Adaptive Images for WordPress] PNG images are distorted - hazing - bad quality"

ساخت وبلاگ

Hello, again,

First of all, let me say that it is very relieving to be able to discuss these matters with experienced users, who go into such detail in the plugin. It honestly helps us understand the real cases a lot better.

About #1:

You are right that excluding PNGs is not the answer. It is simply a temporary workaround. I am so sorry to admit to that!

Now, in cases like yours it will be a lot easier and faster to just empty the image cache and then exclude PNGs by tampering with the plugin code. In file adaptive-images-script.php, after line 828, you could add these lines:

// Exclude PNGs to protect transparent PNGs.
$extension = adaptive_images_script_get_file_extension( $settings['source_file'] );
if ( $extension == 'png' ) { adaptive_images_script_send_image( $settings['source_file'], $settings['browser_cache'] ); exit();
}

As I said, this would be a mere temporary workaround, but it would be so much faster than uploading the PNGs anew! You see, the original images have not been harmed after all.

Let me also note that transparent PNGs are indeed a pain! I am not sure whether we can actually profit by trying to shrink them for all cases. PNGs are meant to be not lossy, so trying to reduce them sort of conflicts with their purpose after all. I mean, in real cases even TinyPNG reduces transparent PNGs at a ~50% ratio, which is good of course, but it does not change the order of magnitude. On the other hand JPEGs can be reduced to even 5 or 10% -or even more- of their original size!

However, PNGs remain one of our top priorities!

About #2

So, of course we are aware of the TinyPNG service, but we do have some drawbacks if we try to incorporate it: i) the host server needs to be able to make remote HTTP requests ii) there is a monthly limit of 500 free requests iii) we fear that performance might be decreased if remote HTTP requests are necessary for PNG images to be resized.

We will definitely try to work out a solution, either by using a service like TinyPNG or -and this would be the best way- try to find a core PHP solution to reduce PNGs.

Let me know if my proposal in #1 works for you for the time being!

Cheers,
Takis

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 206 تاريخ : سه شنبه 4 خرداد 1395 ساعت: 6:48