The problem was down to my use of rel="attachment"
in the anchor, with this removed the editor allows the link to remain pointing to the file url and not the attachment.
Related Posts:
- Set JPEG compression for specific custom image sizes
- Removing default image size list in Media Box
- How to reduce original image quality on upload?
- Best way to programatically add “rel” attributes to page and post images
- Disable auto-resizing of uploaded images, but only for certain filename
- Insert image in WordPress with HTML5 tag and caption function
- Missing feature image link function
- remove empty paragraphs from the_content?
- Solution to render Shortcodes in Admin Editor
- Issues with title-tag and document_title_parts
- Add image size if page template
- Remove Actions/Filters added via Anonymous Functions
- remove links from images using functions.php
- Define custom Page Template without its own .php file
- Add class to menu items of one specific menu (nav_menu_css_class)
- How to influence the information displayed on widget inside wp-admin
- Issue with wp_get_attachment_image() and SVG file type
- How to change the markup WordPress inserts for post images
- How to add a class to the attachment images
- Programmatically Set First Image as Featured
- How to restrict actions and filters “properly” by conditions
- Filter the query ONLY for the search results page
- How to use get_template_directory_uri() to load an image that is in a sub-folder of my theme?
- WP 4.4. responsive loads normal image after loading the responsive image
- opening links in new tab using – add_filter( ‘the_content’, ‘make_clickable’);
- How to add classes to images based on their categories?
- How to create thumbnails for PDF uploads?
- Using add_filter() in Widgets
- Customize WordPress Media Manager – Media Window
- Is it possible to use a forgot password url filter?
- syntax for remove_filter in parent theme with class
- Add body class of category parent
- Is it possible to maintain image aspect ratio when scaling images?
- Auto delete WordPress images/thumbnails (all sizes) and featured after X days/hours, or similar?
- Set image size on media and text block with a function
- Wrap gutenberg block ‘div’ in other elements/extra HTML
- Generating Responsive Background Image Sizes in PHP
- Convert hyphen to underscore in permalinks
- Override parent theme function that is not hooked or in the functions.php file
- Remove Page Title from Static Frontpage
- Programmatically Add Font-Awesome Icons to Category Widget
- Why are image thumbnails cropped proportionally (not per dimensions)?
- Remove bulk actions based on user role or capabilities
- VERY new to coding – keep breaking site trying to add to functions.php
- Create thumbnail on PDF upload with Gravity Forms
- Default or Preset Content for Custom Post Types
- Gallery images titles – get from post
- Remove images from get_the_excerpt
- Remove image from post_content on save_post
- Override a class function to include a custom template
- How to auto-update child posts whenever the parent post is updated?
- How to override filter in child theme?
- Use Exact Image Size using add_image_size
- How to add a rel attribute to images that contains their categories?
- Removing title from page
- Hide some items from Screen options in dashboard for products
- How to change a certain text or term of WordPress into a custom into the whole site?
- Why are image thumbnails cropped proportionally (not per dimensions)?
- Adding body class when post contains a specific shortcode
- Display height and width properties with the_post_thumbnail() or related function
- Insert width & height attributes to all images displayed on each page
- How to run a function once on every post in database?
- Replace Archive Widget Link Text
- Exclude Empty Child Categories in Menu
- How to make unique add_filter to the_content of specific page template files – so each template gets its own addition
- Custom image size in Media Dropdown
- add_filter priority problem
- Limit filter upgrader_post_install to a single plugin
- Removing the first image in content
- Function to auto-set a featured image that is already in use
- Actions according to image type and size
- How to update feed only 2-3 times a week (for Feedburner email)?
- Manipulate Output of wp_list_something: select menu instead of li’s
- Clean-up script tags
- How to use IF Statement in WordPress?
- Woocommerce Storefront WordPress Ignore Media Gallery Images and use External 3rd Party Host
- Overwrite Parent Theme add_image_size in Child Theme
- Images uploaded using media uploader are appearing upside down
- Gravity Forms field entries into wp_query loop [closed]
- Post Pagination Showing Same Posts Every Page
- Show excerpt for only first post in query
- How to add css class to image attached in all the posts?
- Remove function or filter
- modify a function filter
- Add custom image size not working
- Super simple shortcode not working
- How would go about if I just want a temporary function?
- Generating rel=prev and rel=next only on wordpress categories
- How to make applyFilters function return false via functions.php
- Count total number of images in post and echo results as number
- How to filter out shortcode when displaying the_excerpt() in the loop?
- wpautop – disable tags, keep tags
- Accepted arguments value in hook functions
- Get current page_id before loop, in functions.php
- How can you limit srcset on a single type of page?
- how to add an image to the footer?
- Which action hook to use for function?
- Adding multiple taxonomy filters to functions.php
- str_replace function in theme
- How to retrieve the postID in a “image_send_to_editor” hook function?