Image Format Optimization and Deployment Practices at iQIYI: From JPG to AVIF
iQIYI optimized its app’s visual experience by progressively replacing JPG with WebP, HEIC, and finally AVIF—using a caplist‑driven CDN, self‑developed decoders and on‑demand production pipelines—to cut image sizes, reduce CDN bandwidth by over 30 % and maintain quality across static, transparent and animated assets.
Background: Images are the main visual element of the iQIYI APP, directly affecting user experience. The massive launch volume leads to high CDN peak‑bandwidth costs, so reducing image size while preserving quality is a critical task. The choice of image codec is the key to this optimization.
Image format overview
Format
Supports Transparency
Supports Animation
iQIYI APP Usage Scenarios
JPG
No
No
Video cover, general material
PNG
Yes
Yes
Transparent material
GIF
Yes
Yes
Animated images
WebP
Yes
Yes
Video cover, general material, transparent material, animated images
HEIC
No
Yes
Video cover, general material, animated images
AVIF
Yes
Yes
Video cover, general material, transparent material, animated images
With newer formats using higher‑compression codecs, file sizes shrink dramatically at the same visual quality. The following chart shows the size comparison (image omitted in text):
2. Main usage scenarios
Cover images, operation images, resource images, avatar images, and UGC are the typical scenarios. Representative screenshots are shown below:
3. Image format evolution timeline
Before Q3 2020: JPG was the primary format.
Q3 2020: WebP became the default format.
Q3 2022: HEIC was introduced for selected iOS scenarios.
Q3 2023: AVIF was rolled out for broader use.
4. Production‑consumption panorama
The image lifecycle in iQIYI APP spans creation, upload, production, distribution, and display. Each stage involves distinct systems and strategies, making a format switch a complex, end‑to‑end effort.
1) Creation : Images come from AI synthesis, video frame extraction, partner uploads, or external crawling, with many formats.
2) Upload : Different content providers use various backend systems, widening the transformation scope.
3) Production : Backend services pre‑process images according to usage (e.g., video cover, badge). Multiple sizes and formats are generated and stored in the media asset library for downstream consumption.
4) Distribution : CDN and APP backend APIs deliver images. The CDN can produce on‑demand formats when the requested size is not pre‑produced.
5) Display : The mobile image library renders images, sometimes requiring custom decoders for newer formats.
WebP format deployment
Background : In March 2020 iQIYI decided to replace JPG/PNG/GIF with WebP to cut CDN bandwidth.
Difficulty : Image URLs are returned by many mobile‑backend APIs. Modifying all of them to emit WebP URLs would be costly and fragile for future format changes.
Solution – Caplist : The mobile image library appends a caplist query parameter (e.g., ?caplist=webp,jpg ) indicating the device’s supported formats. The CDN parses this list, follows a priority order (AVIF > HEIC > WebP > JPG > PNG), and returns the highest‑priority format that is available, falling back if necessary.
Example: Original URL http://.../image.jpg becomes http://.../image.jpg?caplist=webp,jpg . The CDN first checks cache, then attempts on‑demand production of WebP; if unavailable, it falls back to JPG.
Result : By Q4 2020, WebP accounted for 85% of iPhone image requests (up from 32% in Q3), reducing commercial + self‑built CDN bandwidth by 21.16%.
HEIC format deployment
Background : In May 2020 iQIYI explored HEIC (H.265‑based) for higher compression. Early trials showed good iOS compatibility and >30% size reduction, but Android soft‑decode was 7.75× slower and used 3.76× more memory.
Difficulty : Android decode performance, long HEIC encoding time (unsuitable for on‑demand production), limited pre‑produced coverage, and lack of HEIC animation support.
Solutions : Self‑developed HEIC decoder for Android, achieving >5× speed improvement over the system decoder. Directly return HEIC URLs from mobile‑backend APIs for the few high‑traffic scenarios where caplist could not be used. Develop Q265 HEIC encoder (70% faster than X265) to enable on‑demand production for newer images. Re‑process hot historical images to generate HEIC versions. Self‑developed HEIC animated‑image pipeline (IP‑frame based) for 20‑30% of image traffic that is animated.
Result : By March 2023, HEIC accounted for >40% of mobile image requests, saving >13% traffic compared with WebP. Remaining limitations were high conversion cost and limited caplist coverage.
AVIF format deployment
Background : AVIF (AV1‑based) offers even higher compression. iOS 16+ and Android 12+ support it.
Difficulty : System decoders were still slower, and early AVIF did not support transparency, which is common in iQIYI assets. Coverage of AVIF‑ready CDN directories was limited.
Solutions : Self‑developed AVIF decoder (leveraging the QAV1 video codec) supporting iOS 9+ and Android 7+, outperforming libheif/libaom. Extended the decoder to handle transparent AVIF (added in Q4 2023). Extended caplist coverage to more CDN directories and prepared pre‑production for new assets. Started a full on‑demand production system that can generate any format on the fly without caplist parameters.
Result : By Q1 2024, AVIF accounted for 46.54% of mobile image requests, delivering a 30.71% traffic saving versus WebP. File‑size analysis showed: Static images: AVIF is 38% smaller than WebP and 11% smaller than HEIC. Animated images: AVIF is 72% smaller than WebP and 30% smaller than HEIC.
Conclusion & Outlook
Through cross‑department collaboration, core technology breakthroughs, and fully self‑developed HEIC/AVIF codec solutions, iQIYI has gradually migrated its primary image formats from JPG to AVIF, achieving significant CDN bandwidth cost reductions while maintaining visual quality. Future work will focus on further increasing AVIF adoption and extending full on‑demand image production to cover all CDN domains.
iQIYI Technical Product Team
The technical product team of iQIYI
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.