Cloud Storage Filters and Actions
Filters
media-cloud/storage/after-upload
This filter allows for filtering of an attachment’s metadata after it has been uploaded to cloud storage.
media-cloud/storage/can-calculate-srcset
Determines if Media Cloud should calculate the srcset
for an image.
media-cloud/storage/can-filter-content
Controls if Media Cloud should filter a post’s content.
media-cloud/storage/ignore-metadata-update
This filter can be used to temporarily suspend Media Cloud’s processing of attachment metadata.
media-cloud/storage/ignore-existing-s3-data
Forces Media Cloud to ignore an attachment’s existing cloud storage metadata when processing an attachment.
media-cloud/storage/ignore-optimizers
Forces Media Cloud to ignore the fact that image optimizer plugins are installed and activated.
media-cloud/storage/process-file-name
Filters a given filename, removing any storage related parts from the path, eg the bucket name.
media-cloud/storage/should-handle-upload
Controls if Media Cloud should process a WordPress upload.
media-cloud/storage/should-override-attached-file
Media Cloud will typically intercept get_attached_file()
and return the storage URL if that file is no longer present on the local filesystem. If the file is on the local filesystem, get_attached_file()
will return the file path to it. This filter allows you to override this behavior.
media-cloud/storage/should-use-custom-prefix
Allows the use of custom prefixes on uploads to be overridden from whatever the setting currently is.
media-cloud/storage/upload-master
Controls if the master/main image is uploaded to cloud storage.
Actions
media-cloud/storage/register-drivers
Registers any additional or custom cloud storage drivers.
media-cloud/storage/uploaded-attachment
This is fired once an upload has been added.
media-cloud/storage/migration/complete
This is fired once a migration to the cloud has completed.
media-cloud/storage/import/complete
This is fired once a import from the cloud has completed.