Articles of images

Images dont show in grid view, but do in list view

In media library, images show in list view, but not in grid view. This becomes an issue because adding a featured image is done by grid view only. I had to edit the DB to make all jpg files lower case, and changed the actual picture files to match. Everything shows correctly except grid view. […]

How to get image extension from wp image editor object?

get_extension seems to be a protected method dunno why, seems to me there is no way to get file extension using image editor object… I know I can use getimagesize with php and be done with it but that would mean fetching the image a second time which would be nice to avoid

Add WYSIWYG to Image Description field

I need to build this thing: It’s essentially an image with a caption, and it can go inline anywhere in the text. I could just create a shortcode for it I suppose, but I’d really like to integrate it with the Image Picker to make it easier for my clients. Is there any way to […]

Different upload path per file type

I want to have two different paths for different files. For example, I have all .zip and image files all in the same locations. What I am wanting to the have images in one path (eg. wp-content/uploads/images/) And all the zip files within another location/path (eg. wp-content/uploads/products/) But what I am needing is when I […]

Is it possible to recover featured images after WordPress export/import

We recently moved all of the posts from a production site into a development site using the WordPress export/import routine and we realized that none of the features images came over. A little research shows this is the default behavior for this process (which doesn’t make a bit of sense to me, but whatever). There […]

Is there a way to pull the first featured image in a loop and not all other featured images?

I have a loop that pulls the first three posts of a category. I want to use the featured image of the first post pulled for the background of the section the titles and links to these posts are displayed. Is it possible to pull the first image without pulling all other images of posts […]

WordPress url image redirect to the homepage

Need help please. I have run into an issue with image pages on my site. All url image, redirect to the homepage. I have double check in YOAST SEO and Redirection and found nothing. img:×1021.jpg But if I open the url post first then the url image it won’t redirect to the homepage. […]

How to rename image at uploading on specific plugin or post-type in WordPress

I am working on a plugin. In plugin, there is a custom media uploader. All images upload successfully. Then I want that when I upload images its renamed, so i get this code and write it in my plugin file. function foo_rename_image($filename) { $info = pathinfo($filename); $ext = empty($info[‘extension’]) ? ” : ‘.’ . $info[‘extension’]; […]

Multisite media library uploads broken images

I am having an issue with one of my sub-sites media library. All it uploads are broken images. It loads fine locally but for some reason it gives me the error “Failed to load resource: the server responded with a status of 404 (Not Found)×150.jpg” Locally all uploads goes into my wp-content/uploads path, but […]

How to insert a local image with custom size

I am not very familiar with PHP yet but I am trying to build a WordPress theme. In one of my theme files I simply want to insert an image (located at the theme directory /img/image.jpg) with a link to Since I have already included add_image_size( ‘testtest’, 333, 333, true ); in my functions.php […]