To summarize the discussion in the comments, the answer for the question as it is asked is that it is not possible. The web standards as they are right now do not have a facility to declare a favicon for PDF files, only for the whole domain via the favicon.ico file.
You can try to hack around it by
-
set the favicon.ico at the root of the site to the icon you want to be associated with media files and use the wordpress 4.3 site icon feature to handle the icon for the html (which should have priority over the favicon.ico).
-
server the media files from a different domain (for example a subdomain of the main site) and set there a favicon.ico that you want to be associated with the media files.
Related Posts:
- A link (not in the post) to download a specific PDF file
- Extend Media Library
- WordPress 3.5: Setting custom “full URL path to files” in the Media Library?
- How to show all available images in WP’s media library when using the Polylang plugin?
- Which filters or actions to use after a media upload and delete?
- Protecting direct access to PDF and ZIP unless user logged in (without plugin)
- How to wp_upload_bits() to a sub-folder?
- “Add Media” only shows “Full Size” under Attachment Display Settings
- Is it possible to trigger some JavaScript when Media Popup is opened?
- How to call WP3.5 Media Library manager?
- Password protect some uploaded files, so only logged-in users can view them
- How to protect uploads in multisite if user is not logged in?
- Append button to WordPress Image Details modal
- WP3.5 Media Uploader – how to make it accept multiple images?
- How to disable WordPress Media resize different size version?
- Media library storing files in uploads not folders within in uploads
- Add select field to media uploader that adds a class to the image
- How to host different file formats/types for a media attachment without creating multiple attachments?
- Site icons with alpha channel for self-hosted WordPress blog network
- How do I get allowed Media Library upload file extension list?
- Cannot upload .mp3 file to wordpress media
- Switch between tabs on “Insert Media” dialog
- Restrict WordPress Media Library for a specific user role (users can only see/select own media)
- Display attachments by the ID of the post being edited in the wp.media frame (frontend)
- Is It Possible to Upload Certain Attachment Files To A Remote Server
- move_uploaded_file() not working on wordpress front end
- WordPress Issue : The uploaded file could not be moved to wp-content/uploads/
- Convert (-) and (escape) signs to (_) when uploading files on wordpress media library automatically
- Using wp_enqueue_media() with switch_to_blog() issue
- How to get the return value of wp.media({ frame: ‘post’ }) in all cases?
- Media library only shows for admin. Doesn’t show editor or below [closed]
- upload_max_filesize is set to 64 MB already but WordPress is still showing 2 MB
- PHP error when trying to upload .mp3 files via Media Library [closed]
- Migrating media files (documents only) to a fresh install and maintaining the same directory structure
- How does wordpress handle media files?
- WordPress media upload issue could not insert attachment into the database
- Thumbnail images missing in WP media library
- Open Media Uploader Link in single post or page
- Remove Media File Items From Server That Do Not Exist in Media Library
- Add SWF file to wordpress through custom template
- What if I have a large file on the server that I want the wp library to have?
- Uploaded images result in a file url with full path on disk appended
- Using WP-CLI “wp media import” to sync files to the media library
- Efficient way to move media folder to another folder
- Make inline uploader (plupload) on options page upload to a specific folder
- Images not displaying on site or media library
- Replicate Media Galley Edit view in Add Media View
- Front-End Upload media with category
- How to manually set an attachment in a post?
- Media Library: Remove replace images of selected author
- Adding attachment custom field metadata to TinyMCE tag
- How to upload multiple images using WP rest API to media?
- Media not displaying other users uploads – WordPress 4.9.2
- Organizing the Media Library for Cleanup
- Issues with WordPress 3.9.6 media libraries on XAMPP
- Insert media while posting is not working with new wordpress update
- controlling whether upload is attached to post or not
- How to split my uploaded media into directories?
- wordpress 3.6 media manager cropping timestamp
- Updating Media Library PDF’s in bulk
- Image in binary in the data to WordPress media library
- How can I add custom sizes for PDF thumbnails generation?
- Get Specific Files (Only Specific Extension Type All Files in Loop ) from Media
- How to Upload a media item with alt text and description
- Different upload file size limits based on file type
- How to Protect Uploads, if User is not Logged In?
- How to Fix HTTP Error When Uploading Images?
- Trigger refresh for new media manager in 3.5
- Physical organization of wordpress media library (Real Media Library plugin)
- How to add new tab to media upload manager with custom set of images?
- How to make “Upload files”selected by default in Insert Media?
- Upload images to remote server
- what happens to existing media files when I switch to year/month directory structure format?
- Reject upload of wrong-sized images using the Media Uploader
- Give users a maximum upload capacity; limit the number of files a user can upload OR limit the number of files per upload
- How to add a custom field to the media screen (image/gallery)?
- Can’t upload media, permissions are correct
- Saving Media – Which Hook is Fired?
- Set limit to media upload?
- WordPress 3.5: Switch back to Old Media Uploader?
- Media upload finished hook
- Users can’t upload images on frontend if they haven’t got access to the wp backend
- How can I batch delete all unattached images with WP-CLI or other automated process?
- upload_async.php returns 500 error
- Display attachments by ID in a wp.media frame
- Use a separate custom table (not posts) to handle file upload data
- Media not actually deleted on disk when click “Permanent Delete”
- Image upload callback in new 3.5 media
- Add inline uploader to plugin option page
- Insert images to post not working
- Change Media Uploader default directory
- How to restrict images in v3.5 Media Library modal to only those from a specific post id?
- How to hide media uploads by other users in the Media menu?
- Differentiate Featured Image from Post Images upon Upload
- WP 3.5 media manager – how to create a working gallery frame
- What might cause a POST to wp-admin/async-upload.php to return JSON >and< HTML?
- How to manage a standalone media folder?
- wp_generate_attachment_metadata returns empty array
- How do I link directly to uploaded files?
- Disable media library tab for non admins in uploader screen