• Resolved Hrohh

    (@hrohh)


    Hi, it would by possible to force regenerate sizes with disabled all checkboxes in media options? Im using ACF Image Crop – it is so useful for create only exactly resolution for SLIDER size for example. ..instead define own SLIDER resolution in functions.php and generate SLIDER resolution for each images in upload dir – which is waste of disk space / cpu load. So this plugin is awesome 🙂
    But now, if I have disable “original” size – there is no way generate image from ACF image crop.
    Now plugin (ACF image crop) dont have do_action call after create image, but I can send pull request in github.

    So there are two way
    1) create FORCE button in media listing, which is not connected to settings in media screen
    2) provide some API for compress image below

    
    add_action('acf_image_crop_after_image', 'acf_image_crop_after_image', 10, 2);
    function acf_image_crop_after_image( (int) $attachment_id ) {
        tiny_compress_image( $attachment_id, 'original' ); // instead of 'original'. there can be 'all' for every registered image resolutions
    }
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TinyPNG

    (@tinypng)

    Hi,

    I’m not entire sure that I completely understand what you’re trying to accomplish. Is the problem that you’re running into that after the ACF image crop takes place, no compression is done? Some further clarification on what you’re trying to do would make it easier for us to help you.

    With force regenerate sizes, do you mean using https://ww.wp.xz.cn/plugins/force-regenerate-thumbnails/? If you would do so with all image size checkboxes disabled, your old (possibly compressed) images will be deleted and recreated without being compressed.

    In case you compress the original image size, wouldn’t you get a cropped compressed file with ACF Image Crop for your slides images?

    Thread Starter Hrohh

    (@hrohh)

    What I want is create compressed image from ACF Image Crop plugin with disabled checkboxes in setting in Media in your plugin. But for my client it has to be automatized, not going to Media library, select image from slider, then selected right media and click to force regenerate. It is so many steps…

    ACF Image crop create own media as original from upload media. So If I have disable “original” size in your plugin, there is no way create compressed image.

    With some API in your plugin, it would be so easy.

    • This reply was modified 9 years, 6 months ago by Hrohh.
    Plugin Author TinyPNG

    (@tinypng)

    Thanks for the further information.

    I understand that that would make things easier, but unfortunately that isn’t available at the moment. I’ll be happy to add your request to the list of possible improvements.

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

The topic ‘Force regenerate’ is closed to new replies.