You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Photon: ensure compatibility with Block editor #10580
BugWhen a feature is broken and / or not performing as intended[Feature] Photonaka "Image CDN". Feature developed in the Image CDN package and shipped in multiple plugins[Focus] BlocksIssues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack[Pri] High
The problem is related to the image_downsize filter, which is normally suppressed (in both Photon and ExactDN) by a call to is_admin(), but Gutenberg doesn't use admin-ajax, it uses the REST API, which doesn't send any signals about being in wp-admin.
[...]
Photon and ExactDN should pre-empt the parsing of image_downsize for the REST API when it is detected that the request is made from the editor.
FYI, this now happens again for new uploads in the block editor, because $request['context'] is not set.
I'm using this: if ( is_string( $route ) && false !== strpos( $route, 'wp/v2/media' ) && ! empty( $request['post'] ) && ! empty( $request->get_file_params() ) )...
BugWhen a feature is broken and / or not performing as intended[Feature] Photonaka "Image CDN". Feature developed in the Image CDN package and shipped in multiple plugins[Focus] BlocksIssues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack[Pri] High
Activity
nosilver4u commentedon Nov 9, 2018
You can see my fix here: https://github.com/nosilver4u/ewww-image-optimizer/blob/master/classes/class-exactdn.php#L1747
Used like so: https://github.com/nosilver4u/ewww-image-optimizer/blob/master/classes/class-exactdn.php#L1122
nosilver4u commentedon Jun 2, 2020
FYI, this now happens again for new uploads in the block editor, because $request['context'] is not set.
I'm using this:
if ( is_string( $route ) && false !== strpos( $route, 'wp/v2/media' ) && ! empty( $request['post'] ) && ! empty( $request->get_file_params() ) )...jeherve commentedon Jun 2, 2020
@nosilver4u Thanks for the comment. It just happened that #16035 was reported earlier today.