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



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


(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. }


Since: Jetpack 4.8.0


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: Logo

You are commenting using your 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