Plugin Directory

Changeset 3439324


Ignore:
Timestamp:
01/14/2026 09:24:09 AM (2 weeks ago)
Author:
kubiq
Message:

4.9.1

  • optimize old images convert process
  • remove not working itw_extensions filter
Location:
images-to-webp/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • images-to-webp/trunk/images-to-webp.php

    r3438710 r3439324  
    44    Plugin URI: https://www.paypal.me/jakubnovaksl
    55    Description: Convert JPG, PNG and GIF images to WEBP, speed up your web
    6     Version: 4.9
     6    Version: 4.9.1
    77    Author: KubiQ
    88    Author URI: https://kubiq.sk
     
    326326                            $files = scandir( $folder );
    327327                            $converted = 0;
     328
     329                            $skip_until = false;
     330                            $webp_processed_file = $folder . '/.webp-processed.json';
     331                            if( file_exists( $webp_processed_file ) ){
     332                                $skip_until = trim( file_get_contents( $webp_processed_file ) );
     333                            }
     334
    328335                            foreach( $files as $file ){
    329336                                if( ! $only_missing || ! file_exists( $folder . '/' . $file . '.webp' ) ){
    330                                     $converted += $this->convert_image( $folder . '/' . $file ) ? 1 : 0;
     337                                    if( ! in_array( substr( $file, -5 ), [ '.webp', '.avif' ] ) ){
     338                                        if( $skip_until ){
     339                                            if( $skip_until == $folder . '/' . $file ){
     340                                                $skip_until = false;
     341                                            }
     342                                        }else{
     343                                            $converted += $this->convert_image( $folder . '/' . $file ) ? 1 : 0;
     344                                            file_put_contents( $webp_processed_file, $folder . '/' . $file, LOCK_EX );
     345                                        }
     346                                    }
    331347                                }
    332348                            }
     349
     350                            wp_delete_file( $webp_processed_file );
     351
    333352                            printf( __( '%d converted', 'images-to-webp' ), $converted );
    334353                        }
  • images-to-webp/trunk/readme.txt

    r3438710 r3439324  
    66Requires PHP: 7.0
    77Tested up to: 6.9
    8 Stable tag: 4.9
     8Stable tag: 4.9.1
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3434## Hooks for developers
    3535
    36 #### itw_extensions
    37 Maybe you want to support also less famous JPEG extension like jpe, jfif or jif
    38 
    39 `add_filter( 'itw_extensions', 'extra_itw_extensions', 10, 1 );
    40 function extra_itw_extensions( $extensions ){
    41     $extensions[] = 'jpe';
    42     $extensions[] = 'jfif';
    43     $extensions[] = 'jif';
    44     return $extensions;
    45 }`
    46 
    4736#### itw_sizes
    4837Maybe you want to disable WebP for thumbnails
     
    195184== Changelog ==
    196185
     186= 4.9.1 =
     187* optimize old images convert process
     188* remove not working itw_extensions filter
     189
    197190= 4.9 =
    198191* info banner about new free Images to AVIF plugin
  • images-to-webp/trunk/tabs/tab-general.php

    r2826965 r3439324  
    110110            </th>
    111111            <td>
    112                 <?php $this->extensions = apply_filters( 'itw_extensions', $this->extensions ); ?>
    113112                <?php foreach( $this->extensions as $extension ): ?>
    114113                    <br>
Note: See TracChangeset for help on using the changeset viewer.