Bulk delete media by year

We tried with couple of plugins , but there isn’t any with option to bulk delete images by month or year. If you have access to wp-cli you can try to delete attachments by year and month with: wp post delete $(wp post list –post_type=”attachment” -—year=2016 -—monthnum=12 –format=ids) or just by year with: wp post … Read more

WordPress can’t get image url but both the attachment and the actual file are there

Not sure how you’re using it, but wp_get_attachment_image_src() returns an array. This should work: <?php $attachmentID = 519271; $imageSizeName = “thumbnail”; $img = wp_get_attachment_image_src($attachmentID, $imageSizeName); ?> <img src=”<?php echo $img[0]; ?>” alt=”image”> An alternative to try if it isn’t working: <img src=”<?php echo wp_get_attachment_url(519271); ?>” alt=”image”> This thread discusses your issue further: wp_get_attachment_image_src always returns … Read more

Store images and videos category wise and fetch them in json format

Some how able to get all the images from media library. This is very close. $query_images_args = array( ‘post_type’ => ‘attachment’, ‘post_mime_type’ => ‘image’, ‘post_status’ => ‘inherit’, ‘posts_per_page’ => – 1, ); $query_images = new WP_Query( $query_images_args ); $images = array(); foreach ( $query_images->posts as $image ) { $images[] = wp_get_attachment_url( $image->ID ); }

Create media library feed

Although your question appears to be about an xml feed for library images, the process to display those images on a page requires use of a template with a special query to look for ‘attachment’ type pages, which is how images are stored in the database. That’s a bit more complicated, but I did something … Read more

Blurry Images WordPress 5.8.1

Not sure why @fuxia deleted my first answer, but I may be able to help. My original answer was to say that I was experiencing the same issue. I have discovered the issue and perhaps it will help you. In the Jetpack plugin there are a series of settings under the Performance tab: Enable site … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)