muzei-api / com.google.android.apps.muzei.api.provider / MuzeiArtProvider / onInvalidArtwork

onInvalidArtwork

open fun onInvalidArtwork(artwork: Artwork): Unit

Called when Muzei failed to load the given artwork, usually due to an incompatibility in supported image format. The default behavior is to delete the artwork.

If you only support a single artwork, you should use this callback as an opportunity to provide an alternate version of the artwork or a backup image to avoid repeatedly loading the same artwork, just to mark it as invalid and be left with no valid artwork.

Parameters

artwork - Artwork that Muzei has failed to load