Auto delete pictures in media library by age

You can use these functions to find and delete image attachments that are 3 days old since their date of creation: // Delete attachments (images) that are {n} days old. function auto_delete_old_image_atts() { // How many days old. $days = 3; // TRUE = bypasses the trash and force deletion. $force_delete = true; // Get … Read more

Is there a possiblity to replace profile image gravatar with custom user images

Yes you can use ACF Pro to achieve that First create a field for user image (here: tsm_local_avatar) then filter the get_gravatar function: <?php /** * Use ACF image field as avatar * @author Mike Hemberger * @link http://thestizmedia.com/acf-pro-simple-local-avatars/ * @uses ACF Pro image field (tested return value set as Array ) */ add_filter(‘get_avatar’, ‘tsm_acf_profile_avatar’, … Read more

Can’t add image to site via php

While not really a WordPress issue, it is something we’re all probably going to have to deal with in developing. Check to make sure your ad blocker isn’t the problem. If it is, add your sites to the allowed list of domains so that you can still see what your site is supposed to look … Read more

Number of Style for Image Added into Post

I’m not sure if I understand your question correctly, but… In WP any attachment is a post (of attachment type). So 3109 is ID of that post. This means, that if you’ll take a look at wp_posts table, then you should find that post and there should be some additional info stored as meta fields … Read more

What did I do WRONG?

As explained in one of the comments to your question, the issue is how WP stored images (which are actually a kind of post). If you look at the Media on your developement/local site, you will see that each image has a URL that is related to your local URL. And each image is stored … Read more