wp-media / imagify-plugin

Speed up your website with lighter images without losing quality.
https://imagify.io
69 stars 24 forks source link

Generate next-gen link shall be displayed for images not having webP while option is enabled using filter #827

Open Mai-Saad opened 3 months ago

Mai-Saad commented 3 months ago

Before submitting an issue please check that you’ve completed the following steps:

Describe the bug when enable webp using filter And AVIF is enabled, the previous uploaded images without webP won't have the generate next-gen link

To Reproduce Steps to reproduce the behavior:

  1. Avif is enabled
  2. upload image => image have avif
  3. enable webP using filter

    add_filter('imagify_nextgen_images_formats', function($formats){
    $formats['webp'] = 'webp';
    
    return    $formats;
    });
  4. check media library => delete next-gen is displayed not generate next-gen

Expected behavior generate next-gen link displayed for images not having webP when it's enabled using filter or automatically create the webP for those images. @wp-media/productimagify what do you think?

Screenshots If applicable, add screenshots to help explain your problem. sample image download (33)

Additional context Add any other context about the problem here.

Acceptance Criteria (for WP Media team use only) Clear instructions for developers, to be added before the grooming