• Hi, I hope I’m writing in the correct forum.
    I searched around but I couldn’t find anything, maybe someone here can give me the right hint:

    I’d like to show my “media featured image” on top of each single core mejs instance [audio], but I would say that there is no shortcode to display a cover image based on the media featured image in “single file mode”: did I miss it?

    I noticed that in “playlist mode” there is a “slot” for the media featured image, so I could make use of that as a basis and hide portions of the default playlist structure through css display:none, making playlists with only one track each.

    However, the image shown from the [playlist] shortcode is a resized version of my “cover art/media featured image” (filename_150x150.jpg). How could I use a bigger image? Not the one resized by WP, but my original upload?

    Of course, if there is already an option to show an image from [audio] shortcode the question about the playlist workaround falls ??

    Thank you very much

    • This topic was modified 2 years, 2 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    You can specify a featured image for any media item through the media library editor (from the admin menu, not the post editor pop-up). They are tied to each media item, so the playlist shortcode would only be a factor in that it displays the current track’s cover art. However, you’re stuck with the image size if you rely on the shortcode for cover art. (unless you hack the shortcode handler function)

    What you can do is modify or create a theme template (audio.php) that displays the current media item’s featured image independent of the player. Then you can specify any size you want. Your theme may already have a regular post template that uses post featured images. You could just copy it (ideally to a child theme) and name it audio.php. This template will be used for all single audio attachment page requests.

    If your theme’s templates don’t display featured images, insert something like this into your audio.php template:
    <?php the_post_thumbnail( 'full' ); ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Display audio media featured image with single core mejs player’ is closed to new replies.