RESOLVED FIXED300903
REGRESSION(293871@main): WeChat app allocates large sizes of memory for high resolution images on iOS 26
https://bugs.webkit.org/show_bug.cgi?id=300903
Summary REGRESSION(293871@main): WeChat app allocates large sizes of memory for high ...
Said Abou-Hallawa
Reported 2025-10-16 10:17:21 PDT
The change 293871@main removes setting the value for the key kCGImageSourceSubsampleFactor in the decoding options. This option is very useful when decoding a high resolution image which will be displayed on a much smaller rectangle. ImageIO decodes the image with a smaller rectangle in this case. This saves memory and CPU time.
Attachments
Radar WebKit Bug Importer
Comment 1 2025-10-16 10:17:27 PDT
Said Abou-Hallawa
Comment 2 2025-10-16 10:48:12 PDT
Said Abou-Hallawa
Comment 3 2025-10-17 07:12:53 PDT
Here are other repro steps: 1. On macOS lunch mini-browser or Safari 2. Lunch Activity Monitor to monitor the WebKit allocated memory 3. Open https://upload.wikimedia.org/wikipedia/commons/e/ea/Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg Result: WebKit allocates about 3GB and it may eventually jetsam and crash Expected: WebKit allocates about 200-400 MB and it does not jetsam or crash Note: The size of this image = { 30000 x 23756 }. The memory for decoding this image for its natural size = 30000 x 23756 x 4 = 2.7 GB. But since the window size is much smaller than the natural size of the image, the image should not be decoded for its natural size. This is called image sub-sampling which was dropped by 293871@main.
EWS
Comment 4 2025-10-17 10:51:57 PDT
Committed 301729@main (c4dc35645e7b): <https://commits.webkit.org/301729@main> Reviewed commits have been landed. Closing PR #52489 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.