Hi I am creating a number of image sizes for picture uploads in my functions.php with:
add_image_size( 'cropped', 338, 241, true); add_image_size( 'cropped_xs', 478, 340, true); add_image_size( 'cropped_sm', 676, 482, true); add_image_size( 'cropped_md', 856, 610, true); add_image_size( 'cropped_lg', 1081, 699, true); add_image_size( 'cropped_xl', 1403, 921, true);
When I check the WebP files after upload I notice that a lot of the pictures are much bigger in file size.
For instance I uploaded a picture that was 1403px wide x 1000px tall and it was 83kb in size. The last 3 image sizes in the above list (cropped_md, cropped_lg, cropped_xl) produced file sizes of 84kb, 119kb and 142kb respectively.
Does anyone know what I can put in my functions.php to stop WordPress increasing the files size like this please?
- The topic ‘WebP images are increasing in file size on upload’ is closed to new replies.