Extending wp.media.model, query media from different blog on network and refresh view
Extending wp.media.model, query media from different blog on network and refresh view
Extending wp.media.model, query media from different blog on network and refresh view
Upload video in custom folder
Media attachment pages giving 404’s
It’s not a pretty solution but I used the post__in attribute for this once in a custom plugin. Basically you usually define an array of attachment id’s to show in the media library. library: { type: ‘image’, post__in:[23,25,26] // or a javascript variable that contained the array of id’s } My code was originally built … Read more
What is the need to remove the full size images? Are you dealing with storage space? If not, why give yourself the headache? Just let the full size images stay where they are. You don’t have to use them. You’ll probably find a situation where you want to use it anyways. Also, I’ve never tried … Read more
Depending on the number of images, its probably a good idea to manually download them and run a batch script in photoshop to resize them all. Then re-upload them copying over the files in use. This plugin, Regenerate Thumbnails, may also help
Media Library empty after server move (exact copy of files and db’s)
Just found that I could show attachment page , and then edit the filename from there.
Allow downloading unusual file types
the easy way is using this: // $filename should be the path to a file in the upload directory. $filename=”2016/09/1.jpg”; // The ID of the post this attachment is for. $parent_post_id = 32; // Check the type of file. We’ll use this as the ‘post_mime_type’. $filetype = wp_check_filetype( basename( $filename ), null ); // Get … Read more