I am creating an image slider for the gallery post type. The code below works fine with the classic gallery, however when I use the new Gutenberg gallery block the get_post_gallery_images()
function doesn't retrieve the array of image URLs.
$images = get_post_gallery_images();
echo '<div class="image-row">';
foreach ( $images as $image ) {
echo '<div class="image-container">';
echo '<img src="' . $image . '" />';
echo '</div>';
}
echo '</div>';