Skip to content

GIF

Braze supports displaying animated GIFs and SVG images by default for HTML in-app messages. For all other in-app messages, a custom image library is required.

Custom image library integration

Braze offers the ability to use a custom image library to display animated GIFs with in-app messages.

Although the example below uses Glide , any image library that supports GIFs is compatible.

Step 1: Creating the image loader delegate

The Image Loader delegate must implement the following methods:

The integration example below is taken from the Glide integration sample app included with the Braze Android SDK.

Step 2: Setting the image loader delegate

The Braze SDK will use any custom image loader set with setBrazeImageLoader . We recommend setting the custom image loader in a custom application subclass:

Custom Image Loading with Jetpack Compose

To override image loading with Jetpack Compose, you can pass in a value to imageComposable. This function will take a Card and render the image and the modifiers needed. Alternatively, you can use customCardComposer of ContentCardsList to render the entire card.

In the following example, Glide’s Compose library is used for the cards listed in the imageComposable function:

「このページはどの程度役に立ちましたか?」
New Stuff!