Have you had a look at is_user_logged_in()?
If you can explain how you’re serving the photos I can perhaps suggest a way to authorize some images to be shown and the rest hidden to only logged in users.
Related Posts:
- Can’t upload media, permissions are correct
- Media not actually deleted on disk when click “Permanent Delete”
- What permissions does wp-content/uploads need?
- WordPress monthly upload directory owner set to root
- Set a maximum upload count for users on a specific user role
- Moving Media Library
- How to set custom upload directory per user after moving content directory
- How to get profile user id when uploading image via media uploader on profile page
- Maximum upload size changes in php.ini ignored – How to remove upload size limit?
- What error logs can I check to see why plugin updates are failing?
- Copying uploaded images not working in wordpress
- The uploaded file exceeds the upload_max_filesize directive in php.ini
- How to allow logged out users to upload media?
- Saving file to disk receiving fopen error
- User permissions to upload images
- wordpress upload permission on nginx & ubuntu
- How do I force WP to set upload directory permissions correctly?
- How to upload prc file type?
- Unable to upload anything to WordPress site
- I migrated WPMU site: Unable to create directory uploads/… Desperate for help!
- Used Duplicator to transfer a site. Now my media uploads aren’t working
- Problem uploading files, after changing domain name
- Basic File/Post restriction plugin
- Is there a standard public URL convention used on a WordPress site directly to a page listing all of a user’s public content?
- How do I protect my uploads?
- Cannot upload themes. Error: “The uploaded file could not be moved to /var/www/wp-uploads/localhost/2011/10.”
- Limit image upload to one and disable audio, video and other document file types to upload
- what happens to existing media files when I switch to year/month directory structure format?
- Media upload finished hook
- How can I batch delete all unattached images with WP-CLI or other automated process?
- Image upload callback in new 3.5 media
- “Add Media” only shows “Full Size” under Attachment Display Settings
- Differentiate Featured Image from Post Images upon Upload
- What might cause a POST to wp-admin/async-upload.php to return JSON >and< HTML?
- wp_handle_upload() – how to upload to a custom subdirectory within uploads
- There’s a way to scale media (images) at 50%?
- How to Reduce the Maximum Upload File Size?
- How can I prevent uploading bmp image?
- how to upload mp3 from url to wp media
- How to get the image url in the input box from media library?
- Post Specific Uploader
- WordPress site stuck at 1MB for max file size
- Failed media import
- Media upload via backend doen’t work after moving site
- Specified file failed upload test. Error When Uploading Image From Front-end
- Where is Featured Image code stored in WP?
- Insert into Post button is missing for certain images
- Thumbnails produce unwanted gray pixels on white background [closed]
- Prevent renaming of uploaded media
- How do I get allowed Media Library upload file extension list?
- Is it possible to upload text files (e.g. JSON) to wordpress blog in any way? [closed]
- How to manage a big collection of files with wordpress?
- Allow only attachment uploaded to current post
- Post processing of uploaded file
- Restrict access of admin uploads to certain logged-in users?
- upload_mimes not accepting CSV
- Receiving 404 when uploading file larger than 10kb
- Password protect any file in WordPress
- Is it safe to allow non-admin users access to media uploader
- File Upload from Frontend
- WordPress Bug on IIS ? Problem when uploading image on IIS 7
- Upload mime types for ai illustrator file
- upload_max_filesize in .user.ini Not Reflected in Media Upload
- How to resize attachement
- How does WordPress decides how many sizes of an image to create?
- Big file upload give HTTP error
- Organizing uploaded Media in permalink-based folder structure?
- What functions of WP_Filesystem allow me to create a file with code-generated contents in a directory?
- Image upload to media library fails. Folder won’t create, database insert fail, XAMPP Windows
- Right way to download file from source to destination
- Dynamically determine the width and height of a image file to be cropped & uploaded AFTER form submission given fixed aspect ratio
- Incorrect filenames in load-scripts.php parameters
- Embed HTML5 files/subfolders in post?
- Import media (.xml) does not attribute featured images to posts
- Blog suddenly can’t display .jpg
- wordpress Do not show new image attachment in media
- 413 Request Entity Too Large nginx/1.18.0 (Ubuntu)
- Modify Maximum upload file size text in WordPress Media
- Manipulate the files uploaded via Gravity Forms before they are stored
- Replicate Media Galley Edit view in Add Media View
- Front-End Upload media with category
- Cannot upload png photo files into media library. I get a ‘Could not insert post into the database’
- Do audio files impact the loading time of the website?
- File upload in WordPress
- Set default “Link CSS Class” in add media admin editor
- How to change default upload dir?
- How could you allow users to upload a video in within their profile and display it on a wordpress site?
- 45mb File Exceeds the Maximum Execution Time
- How to share media between independent blogs?
- WP Capabilities to Add Media, Use Media, But Not Edit Them
- Limit attachment caption characters
- Password protected uploaded PDF page
- CSS updates appear after delay [closed]
- Why isn’t my enqueuing working properly?
- What is the best way to upload a temporary & sensitive file and then delete it when done
- How do I allow family commenters to upload photos?
- Do I need FTP set up to upload files to wordpress server
- Media Gallery doesn’t show (using WP-Read Only)
- How do I restore attachment from files in wp-upload
- How do I share a Git repository with multiple users on a machine?