• Nolte

    (@moxiedeveloper)


    Hi There,

    We are using W3 Total Cache’s CDN feature to sync our media attachments of the site to S3 bucket and then serving through CloudFront CDN distribution.

    The issue we are facing is, the custom sizes of the images that this plugin is creating by cropping them in required sizes, are not being synced to S3 bucket by the W3 Total Cache’s CDN feature, because those custom images are not registered as any attachment on the WordPress environment and as a result receiving 404 on frontend for those custom sized images.

    Would it be possible to add the custom images that are being created to WordPress attachments ? if that can be done, everything will run smooth.

    If thats not possible, can you please add a new hook just after saving the custom resized file, so that we can access that hook and perform actions to upload that file to S3 bucket manaully?

    File where we want the hook : tiled-gallery.php
    Function where we want the hook : vt_resize()
    Place where we want the hook : on the line 211 just after the image saving “$new_img_array = $tp_image->save();” line.
    Need to have following data passed in the hook : $file_path, $$new_img_array, $image_src.

    Awaiting your valuable response.

    Thanks & Regards,

    https://wordpress.org/plugins/tiled-gallery-carousel-without-jetpack/

  • The topic ‘Require custom Hook after saving the resized file, to carry out desired actions’ is closed to new replies.