apply_filters ( 'jetpack_photon_admin_allow_image_downsize', bool false, array $args )

Provide plugins a way of running Photon for images in the WordPress Dashboard (wp-admin).<p>Note: enabling this will result in Photon URLs added to your post content, which could make migrations across domains (and off Photon) a bit more challenging.</p>

Source file: class.photon.php

View in GitHub

Parameters

false

(bool) false Stop Photon from being run on the Dashboard. Default to false.

$args

(array) { Array of image details. @type $image Image URL. @type $attachment_id Attachment ID of the image. @type $size Image size. Can be a string (name of the image size, e.g. full) or an array of width and height. }


Changelog

Since: Jetpack 4.8.0


Notes

This will allow Photon’s image_downsize callback to run when viewing the dashboard (wp-admin). For environments where all intermediate images are dynamically generated, this can come in handy as we can re-use the same image resizing logic on both front-end and dashboard.

You can use the filter like so:

add_filter( 'jetpack_photon_admin_allow_image_downsize', '__return_true' );

Have a note to contribute?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s