I have added a custom url field to the media file in the media library! When using the wordpress gallery gutenberg block you get the choice to add a url. It will give you the option to link it to attachment page! I was wondering could you add the option to link it to the custom field i added.
Thanks for your suggestion but I do not see any benefit to do that. What will display on the frontend if the gallery block link to the custom field URL? You can simply create your own gallery images with custom code and output the field value associated with the image.