We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mode variable Changes for the faster images
Ref: https://secure.helpscout.net/conversation/525784592/21877?folderId=1060551
Wordpress org: https://wordpress.org/support/topic/hotlinked-images-frequently-get-stretched-to-unnatural-dimensions/page/2/
I just found this interesting bit of code in your class-amp-image-dimension-extractor.php:
private static function fetch_images( $urls_to_fetch, &$images, $mode ) { // Use FasterImage when for compatible PHP versions if ( ‘synchronous’ === $mode || false === function_exists( ‘curl_multi_exec’ ) || version_compare( PHP_VERSION, ‘5.4.0’ ) < 0 ) { self::fetch_images_via_fast_image( $urls_to_fetch, $images ); } else { self::fetch_images_via_faster_image( $urls_to_fetch, $images ); } }
In this code, the $mode is always set to ‘concurrent’.
My server has the function curl_multi_exec.
My server has php version 7.0.23.
So it looks like, in my case, the images are retrieved by using the faster_images client.
The code for curling the images is in FasterImage.php. Plenty of settings to play around with.
However, something has caught my eye:
use WillWashburn\Stream\Exception\StreamBufferTooSmallException; use WillWashburn\Stream\Stream;
Will Washburn is the author of the FasterImages code. But folder called WillWashburn exists in amp4wp.
The text was updated successfully, but these errors were encountered:
@MARQAS will create a filter so users can modify the settings as per their requirement.
Sorry, something went wrong.
#1833 filter added for mode type
5e0d252
#1833 Empty variable created
65b5021
Where is the setting we can modify as per our requirement?
MARQAS
No branches or pull requests
Mode variable Changes for the faster images
Ref: https://secure.helpscout.net/conversation/525784592/21877?folderId=1060551
Wordpress org: https://wordpress.org/support/topic/hotlinked-images-frequently-get-stretched-to-unnatural-dimensions/page/2/
I just found this interesting bit of code in your class-amp-image-dimension-extractor.php:
private static function fetch_images( $urls_to_fetch, &$images, $mode ) {
// Use FasterImage when for compatible PHP versions
if ( ‘synchronous’ === $mode ||
false === function_exists( ‘curl_multi_exec’ ) ||
version_compare( PHP_VERSION, ‘5.4.0’ ) < 0
) {
self::fetch_images_via_fast_image( $urls_to_fetch, $images );
} else {
self::fetch_images_via_faster_image( $urls_to_fetch, $images );
}
}
In this code, the $mode is always set to ‘concurrent’.
My server has the function curl_multi_exec.
My server has php version 7.0.23.
So it looks like, in my case, the images are retrieved by using the faster_images client.
The code for curling the images is in FasterImage.php. Plenty of settings to play around with.
However, something has caught my eye:
use WillWashburn\Stream\Exception\StreamBufferTooSmallException;
use WillWashburn\Stream\Stream;
Will Washburn is the author of the FasterImages code. But folder called WillWashburn exists in amp4wp.
The text was updated successfully, but these errors were encountered: