Skip to main content

benecaster_episode_artwork_url

Filter Free

Filters the episode artwork URL after the fallback cascade is resolved (episode → show → plugin default).

Return a URL string. Cast with (string). Feed-only.

Per the project’s artwork rule, <itunes:image> carries the host’s original URL, not a WordPress-resized copy — returning an attachment URL for a cropped size will publish artwork that fails Apple’s minimum dimension check. Returning '' omits the episode artwork and apps fall back to the show artwork.

Parameters

Name Type Default Description
$url string — Artwork URL
$episode_id int — ID of the episode
$show_id int — ID of the show

Returns: string

Example

add_filter( 'benecaster_episode_artwork_url', function( $url, $episode_id ) {
    // Use a WebP version of the artwork if the server supports it.
    $webp_url = get_post_meta( $episode_id, '_benecaster_artwork_webp', true );
    return $webp_url ?: $url;
}, 10, 2 );

Need this built rather than just documented? See our services →