For directory (folder), only read is not enough. You need to set execute also. Because for directory, execute means you can enter the directory.
Files need read permission & directory needs read & execute permission.
So the directory permission should be: 0555. However, image files inside that directory should be just read, in numeric form: 0444.
For example, in your case, /legacy-images/ directory will have 0555 permission & /legacy-images/image1.png image file will have 0444 permission.
Shell Command
If you can access shell and know how to, you may use the following shell commands (replace <WP_DIRECTORY> with appropriate WordPress installation directory):
cd <WP_DIRECTORY>
chmod 555 legacy-images/
cd legacy-images/
find ./ -type f -exec chmod 444 {} \;
Related Posts:
- How do I prevent a folder from reappearing in my home directory?
- How to add a class to the attachment images
- Change the filename format of saved featured images
- How to register images uploaded via FTP in media library?
- Rename image uploads replacing “width” and “height” in filename with “medium”, “large”, “small”
- Debugging upload problem: What part of WP does actual image-resizing?
- Add custom image sizes to media uploader
- Conditional Statement – check if post has an attachment image
- How to upload imagick resource to media in wordpress
- Use Filename for Alt and Title Tags
- Adding graphics to 404.php page
- How do I get images (with a thumbnail preview) to show in search results?
- Add custom HTML to posts page
- Strip Image Classes from HTML Output
- Additional image sizes are not being generated
- Adding a querystring to an image URL when clicking ‘insert into post’?
- login wp impossible
- Assign a picture URL to a page via PHP
- Change logo based on incoming domain
- How to scale image with equal width and height without distortion?
- Validate Uploaded Image using WordPress’ Built-in Functions?
- Get most recent media upload
- Convert all images to PNG on file upload
- Escape post image attachments added to template
- Auto crop images in WordPress
- Display post image with fancybox
- Vagrantpress + composer
- Echo URL of large version of Featured Image
- Get different images for mobile and desktop with php, advanced custom fields without using js and ajax
- Custom location for attached images
- Using a `Template Parts` folder instead of an `Includes` folder in a Custom WordPress Theme
- Cannot display or echo alt text on featured image
- Recent posts with featured image or fallback image with permalink
- Set the background to a default image if there isn’t a specified “featured image”
- Mass update excerpt
- How to get next image with this code from same post?
- get_children displaying images removed from the page
- Why is image hard cropping for one image using add_image_size not working?
- Scrape external webpage for first image and add it to new post
- “imagejpeg” function is not working in wordpress
- Display image from an external rss feed on wordpress without plugins
- WordPress automatically adds links to uploaded images
- Call to undefined function mysql_connect() After upgrading PHP 7.1 to 7.3
- PHP in CSS file?
- Timthumb.php image gallery not working on Multisite WordPress
- Where are the src and srcset sizes coming from?
- HTML showing after PHP code in tag
- Only show first image in foreach loop
- trying to get wp_get_attachment_url to output clickable link
- Creating black and white copy of an image [closed]
- Shortcode function doesnt work without caption
- Get featured image with custom size outside WordPress
- Images Uploaded saving onto older/previous year folders
- Add valid XHTML closing img tags to WordPress galleries
- Convert canvas to image and upload image to server
- How to Make Thumbnail of Post Stay Animated
- Unexpected token ILLEGAL, even on clean install – jquery-issue?
- Convert all uploaded PNG files to PNG-8 format
- foreach repeat html structure after every nth for attachment [closed]
- CSS images don’t show up with bloginfo
- how to show images without passing it to timthumb.php file for resizing
- Some problems in custom widget
- Displaying images outside the content
- Infinite Loop in WordPress Installation
- Change extension to .jpg when webp is not supported
- Prepend to all image URLs with PHP, only for mobile devices
- Change the URL of an image from wp_get_attachment_image_src for Product Posts based on Category
- Configure WordPress to Use Responsive Image Rendering
- How to use data URL in WordPress?
- Replace background image with post thumbnail in shortcode
- Resize post thumbnail
- Where Do Image Dimensions Get Added To A Filename?
- Featured images duplicating and replacing next image
- Get list of posts from attachment
- I can’t load my images from a js file using wp_localize_script
- Autoloading Classes in Plugins
- Get the image title and alt from custom query
- How to always display full size image
- what’s the syntax for if the image exists get the image?
- Resource 404 error on multisite subdirectory install
- Retrieving specific images from Media Library
- How do I routinely extract the thumbnail of the most recent post?
- How to change this internal image link parameter using PHP?
- Pass php to database in JQuery: With AJAX?
- magic-quotes – breaks admin totally
- Retrieve first image url from custom post with pagination
- WP white screen of death after duping a site that works fine on same server
- images in wordpress themes
- How to use custom fields to replace top-level parent title with an image using wp_list_pages?
- Crop images in both sides on wordpress [duplicate]
- Correct Syntax for uploading files to custom directory in WordPress
- How do I return an image from a script
- Where to store the images of a custom WordPress theme?
- Display Post Titles on top of the_post_thumbnail()
- add if statement to the featured image
- How to remove the intro animation which appears during the load up of some WordPress themes? [closed]
- Use URL query string in img src attribute
- Add/alter image attribute before render
- Get a list of folders inside uploads directory
- HELP PLEASE PHP slider css