-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow Image CDN to Proxy HEIC / HEIF Images (#33494)
* Allow Image CDN to Proxy HEIC / HEIF Images The backend `Photon_OpenCV` extension actually does build in HEIC support using the following libraries: ``` libheif-decoder.cpp libheif-decoder.h libheif-encoder.cpp libheif-encoder.h ``` What's more it's even allowed by `photon/index.php` because while the `$allowed_types` is currently set as: ``` 49 $allowed_types = apply_filters( 'allowed_types', array( 50 'gif', 51 'jpg', 52 'jpeg', 53 'png', 54 ) ); ``` `libheif` returns `jpeg` as the type for HEIC images: ``` $ wp shell wp> $i = new Photon_OpenCV(); => object(Photon_OpenCV)#4849 (0) { } wp> $i->readimageblob( file_get_contents( 'img.heic' ) ); => NULL wp> $i->getimageformat() => string(4) "jpeg" ``` So all we need to do is to allow `heic` extensions to be passed through Photon. In fact we can test this right now and see that it works as expected: - HEIC: https://xiao.blog/sample.heic - JPEG: https://i0.wp.com/xiao.blog/sample.heic?w=600 * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/6480951346
- Loading branch information
Showing
12 changed files
with
90 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
jetpack_vendor/automattic/jetpack-search/build/customberg/jp-search-configure.asset.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-block-editor', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport'), 'version' => '10b3dd91ac891b56f5e6'); | ||
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-block-editor', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport'), 'version' => '378ccdaf497dab1e5669'); |
2 changes: 1 addition & 1 deletion
2
jetpack_vendor/automattic/jetpack-search/build/customberg/jp-search-configure.js
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.asset.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<?php return array('dependencies' => array('wp-i18n', 'wp-jp-i18n-loader', 'wp-polyfill', 'wp-url'), 'version' => '0aa4f53ecbe8911b5307'); | ||
<?php return array('dependencies' => array('wp-i18n', 'wp-jp-i18n-loader', 'wp-polyfill', 'wp-url'), 'version' => 'b36b17c4696210868182'); |
2 changes: 1 addition & 1 deletion
2
...ack_vendor/automattic/jetpack-search/build/instant-search/jp-search.chunk-main-payload.js
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
jetpack_vendor/automattic/jetpack-search/build/instant-search/jp-search.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.