Skip to main content
Associate II
April 9, 2026
Solved

TouchGFX: PNG vs JPEG support and audio format recommendation on STM32U5

  • April 9, 2026
  • 2 replies
  • 196 views

Hello,

I have a few questions regarding image and audio formats on STM32U5.

For graphics with TouchGFX, I see that PNG is usually used. However, in some MCU documentation it is recommended to use JPEG. Also, when I try to add a JPEG image directly in TouchGFX Designer, it does not work.

Which format is preferable between PNG and JPEG for TouchGFX?
Why is JPEG recommended in some MCU documentation?
Is JPEG intended only for dynamic loading with software or hardware decoding?
What is the recommended way to use JPEG images with TouchGFX, if possible?

Regarding audio on STM32U5, which audio format is recommended such as WAV, MP3, AAC or other?
Is there a specific library recommended for audio playback on STM32U5?
Is there an optimized solution provided by ST?

Thank you in advance for your help.

Best answer by Osman SOYKURT

Hello @Ameni ,

TouchGFX natively supports PNG as an image format and SVG for vector images. When you mention JPEG, I believe you are referring to the JPEG codec, correct? It is technically possible to use it with TouchGFX for JPEG images, but it is not supported natively

We use the JPEG codec  (or LibJPEG when the MCU does not provide one)  for video decoding in our Video widget. However, audio is not supported in TouchGFX; only the video frames are displayed.

2 replies

MM..1
Chief III
April 11, 2026

Yu mix two different Q. TGFX images is for designer png or svg supported. PNG is converted to bitmap in flash.

Any other stored images formats isnt supported in designer only in code. Jpeg or BMP pictures on TouchGFX - STMicroelectronics Community

And U5 dont have audio decoders by hw, then is your choice how code and sw decoder you use.

Osman SOYKURT
Osman SOYKURTBest answer
Technical Moderator
April 16, 2026

Hello @Ameni ,

TouchGFX natively supports PNG as an image format and SVG for vector images. When you mention JPEG, I believe you are referring to the JPEG codec, correct? It is technically possible to use it with TouchGFX for JPEG images, but it is not supported natively

We use the JPEG codec  (or LibJPEG when the MCU does not provide one)  for video decoding in our Video widget. However, audio is not supported in TouchGFX; only the video frames are displayed.

Osman SOYKURTST Software Developer | TouchGFX