Hi there,
you could use WordPress Custom Fields to add the Image URL and display it in the sidebar using a Shortcode. So something like this:
1. Add this PHP snippet to create the shortcode function:
function db_show_book_cover() {
global $post;
$book = get_post_meta($post->ID, "book", true);
if ( $book ) {
ob_start();
printf( '<img class="book-cover" src="%s">',
$book
);
return ob_get_clean();
}
}
add_shortcode('book_cover', 'db_show_book_cover');
Adding PHP: https://docs.generatepress.com/article/adding-php/
2. Add the shortcode [book_cover]
to a HTML widget in your sidebar.
3. In the post editor create new custom field with a Name of book
and then add the full URL to the image in the Value field.