Get urls of images in a gallery? July 25, 2022 by Tarik Billa I believe the function is wp_get_attachment_url(). There also is one for thumbnails. See wp-includes/media.php.