Needs work
Project:
Drupal core
Version:
main
Component:
image.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Mar 2021 at 06:44 UTC
Updated:
6 May 2024 at 14:36 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #4
simbaw commentedRoot cause: This issue caused by the PHP function 'pathinfo()' parsing error.

Case 1: phthinfo('private://br_01_rev02_0_0.png.jpg') ->
Case 2: phthinfo('private://2021-02/BR_01_rev02_0.png.jpg') ->
The $converted_image_uri is:
Case 1: private:/br_01_rev02_0_0.png
Case 2: private://2021-02/BR_01_rev02_0.png
So we need set $converted_image_uri to correct in case1
Comment #5
simbaw commentedComment #6
Madhu kumar commentedThis does not work if your default file scheme is private and you are trying to generate an image style for a public file.
Comment #7
simbaw commentedHi Madhu,
Thanks for reminding me, I have updated the patch.
Comment #8
gauravvvv commentedI have attached after and before patch screenshots. Image other than the .jpg extension seems to be broken.
Comment #9
Madhu kumar commentedPatch #7 applied cleanly and it is working well.
Comment #10
simbaw commentedI found applying the patch of #7, the image will be broken on ie11. Because the content type in the response header is sometimes different from the image type, but in IE11, the response header and the image type need to be the same.
So I create a new patch for this.
Comment #12
simbaw commentedComment #13
simbaw commentedComment #14
simbaw commentedThe pathinfo can not support the Chinese. so I updated the patch.
https://www.php.net/manual/en/function.pathinfo.php
Comment #17
connbi commentedComment #18
Munavijayalakshmi commentedRectify custom commands failed errors.
Comment #20
Munavijayalakshmi commentedComment #23
arakwarIs this still an issue in Drupal 10.2 (and 11) ?
While trying to redo the patch for 10.2/11, I can see core changed and seems to be close to what the patch does, but for now I can be 100% sure of it.