Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Use source_url for media file link URL in image block #11254
When inserting an image with the image block, you can set its link to "Media file". In the Classic Editor, this has traditionally been the original full-size image. In Gutenberg currently, this ends up just pointing to the file for the size of the image that is inserted into the post.
For example, if you insert the thumbnail size and select Media file for the link, it will just link to the thumbnail. That's not particularly helpful, since it's already loaded in the post body.
This PR just switches the link to use the original source_url for the image instead of the URL for the same size that is inserted into the post.