You’ll need to add a rewrite rule to your .htaccess
:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_REFERER} !/wp-admin/ [NC]
RewriteRule ^wp-content/uploads/.+?\.(jpe?g|png|gif|svg)$ /my-page [R=301,L]
</IfModule>
Add this after anything added by WordPress. You’ll need to replace /my-page
with the slug of the page you’d like to redirect to.
Related Posts:
- How to redirect homepage to actual URL?
- i want to change URL of WordPress image or rewrite in runtime
- Images in sub-pages fail to load
- How do I get the avatar URL instead of an HTML IMG tag when using get_avatar?
- Programmatically get images by URL and save in uploads folder
- Function to get URL of original uploaded image – full size
- How to reference a theme image in a stylesheet?
- Mixed content warnings after changing site adress from HTTP to HTTPS
- Redirecting WordPress /.htaccess / HSTS / SSL
- Fixing external image urls
- Preview Image Path in Admin Section
- Why would image paths in wordpress suddenly change?
- Server (WordPress) redirects files that are not supposed to (using htaccess)
- How to store media files in subdomain
- Remove the http protocol from images
- How do i reference the theme path in pages for images?
- @wordpress/create-block image url in css
- Alias ‘wp-content’ directory to something shorter (framework?)
- WordPress url image redirect to the homepage
- Broken urls with http site and https wp-admin
- A way to change image urls in post to cdn image url?
- How to change image url?
- Redirect home to another page with htaccess
- Update image links in database
- Shortcode for a link and thumbnail
- media_sideload_image with rewritten urls?
- add_rewrite_rule fro html to another url not working
- Changed permalink structure. Need help with redirecting old posts
- How to redirect URL with subfolder to the same URL but without subfolder?
- Wildcard forward all posts and pages with few exceptions
- Regex expression for redirecting image URLs to another folder
- reducing number of URL Redirects and increasing speed
- How to add an image to a custom url?
- images not showing after transfer
- URL masking of subdomain to main domain using .htaccess
- Change media URL (images)
- Redirect to another page using contact form 7? [closed]
- Is WordPress API visible from PHP file called in htaccess
- How to make my site use HTTPS for images or how to insert images as relative paths?
- Clicks registering on Preview DNS site
- Migrated site – Images have 404 error
- Is it possible to enable the ‘Link To’ field under ‘Attachment Display Settings’ for a Featured Image?
- Using a .pdf file as a page in wordpress
- How to get image URL from media_sideload_image?
- Exclude image url from search query
- How to pass on a value as parameter via url to another page
- How to replace post image url before posting using api?
- Deleted Image giving a 301
- Hide or mask the url to an image
- Glitched page redirects to image
- How to show a full page when someone links directly to an image on my site
- Redirect only PDFs in different folders?
- Bypass wp_safe_remote_get()?
- Which tools should I use for a gallery that uses an API and url for the path of the images?
- List sub pages with custom field content converting image ID to URL
- Redirect Causes Missing Images
- different CNAME to corresponding subfolders
- Change the image for a certain URL
- How to watermark wordpress images from wp-content/uploads folder with htaccess and php?
- Setting name of attachment URL
- Search and replace image urls in posts
- Protocol relative url not pulling up images on IE, FF, and OPERA
- Broken image URL
- How do I mitigate the forward slash problem for URLs of images after a WP migration?
- get_post_custom: get image URL instead of image ID
- Some images 404
- Are image addresses security relevant?
- Remote Image (from URL) as Media Library element
- Redirect ignore last URL segment
- Multisite image URLs incorrect in editor
- WPALLIMPORT Exporting images from repeater field [closed]
- All WordPress Website Images Broken
- WordPress Single Post image gallery as slider
- Custom image size not displaying with wp_get_attachment_image()
- ErrorDocument 410 gives me back a 302 header
- how to regenerate webp et-pb-portfolio-image
- Regenerate BIG threshold scaled images
- Recreate the upload folder from a website without having access to the backend/cpanel/filezilla directly from the website
- how automatically show the image title before the image caption/description in a wordpress gallery?
- Trouble with Uploading and Displaying Images
- How to use default image as featured image by implement some code in function.php
- How to increase media image scale limit?
- Images getting smashed
- change the h3 subtitles of the wordpress gallery shortcode
- Unset image sizes before images are uploaded
- Auto Generate Thumbnail
- Images not loading on webpage, and links to other media give 404 Not Found
- WordPress Multisite: Images moved to /sites/1?
- Pictures randomly replaced by blue question mark
- Loading and Referencing Images
- Understanding Redirects
- wp_insert_attachment() dupplicate attachment posts
- How to echo images Urls from a wordpress post, that are relally in the post
- Adding Post Thumbnail to Metro Pro Theme
- Image title replace with current date
- media_handle_upload() with 1 image under 1Mb chokes my server and returns timeout error
- multisite 404 subfolder same name slug as site
- WordPress PHP custom function is causing 500 Internal Server Error Connection Timeout
- Word press cutting sliding images – not displaying the entire image
- WordPress Responsive Image ( srcset ) not work properly