New answers tagged

1

When you create an attachment, do the following: If attachments parent ID is for a post with an excluded post type, do nothing If it isn't in the list of excluded post types, assign it a tag in a hidden custom taxonomy e.g. function tomjn_add_term( $post_id, \WP_Post $p, $update ) { if ( 'attachment' !== $p->post_type ) { return; } ...


1

Media items are just like posts with post_type = attachment and post_status = inherit. when we are on upload.php page, we have two views: List View Grid View Grid view is populated via JavaScript and list view is extending normal WP_List_Table. Since it (List view) is using normal post query we can use pre_get_posts to alter the query to hide required ...


0

Try deactivating the plugin "Login-Log". That worked for me. If thats not it just disable all plugins and see if that helps. If so you just have to test which one brakes grid view for you.


2

WordPress has some standard images thumbnail,medium,medium_large,large for which image sizes you can set it under Settings --> Media except medium_large size whose default height set to 768px ( medium_large is available from WP4.4). So when you set 0 to in the media settings it won't generate thumbnail,medium size,large size images and it didn't as far ...


0

I have the exact same problem. The closest solution I can think of is a little hacky, and it definitely is not great if you will be doing this import often. My solution is to use WP All Import to import new posts for each image, so that each image gets uploaded to your media library. This will also create 5000 garbage posts, but you can delete them ...


0

I got it solved.... function filter_image_send_to_editor($html, $id, $caption, $title, $align, $url, $size, $alt) { $animatedGif = (bool) get_post_meta($id, 'animated_gif', true); if($animatedGif){ $gifCoverImgUrl = get_post_meta( $id, 'animated_gif_cover_url', true ); // build my GIF player if(isset($gifCoverImgUrl) &&...


0

There is a plugin Add From Server that allows you to select files from the "uploads" folder and import them in the Media Library.


0

Because WordPress is not scanning all the folders all the time. When you upload images Wordpress also makes an entry in the database, records the caption, the sizes that are available and so on.


1

By default, when you upload an image via the admin, it's metadata is added to the database, and that's how you can search through them in the media library etc. If you upload images via ftp then they won't appear in the DB so won't show up in the admin area. Use a plugin such as https://wordpress.org/plugins/media-from-ftp/ which will let you loop through ...



Top 50 recent answers are included