Automatically link image blocks to original image file
-
Hi all, hoping someone can help. I’m using the twenty twenty-one theme and the block editor. When I insert an image I choose to display the ‘large’ scaled images, but I want to link all images to the original media file. Problem is there appears to be no default way to set this like there was in the classic editor. I have hundreds if not thousands of posts, across a few blogs and it’s not practical to go through them all manually.
Is there a way I can add a filter / function to my child theme that will dynamically link all block images, and block galleries, to the original image files, I.E not the resized versions WordPress creates?
Any help would be gratefully received.
- The topic ‘Automatically link image blocks to original image file’ is closed to new replies.