1
vote
1answer
46 views

Show attached media image if no thumbnail image detected

I use the if ( has_post_thumbnail() ){} to check if the post have thumbnail image, but this echo get_attached_media('image', $post->ID); displays the word Array I need to show the ...
0
votes
1answer
40 views

Create a custom attachment thumbnail for quick page load

I've been trying to find a way to create a custom image attachment thumbnail. I want to display an image attachment thumb and link to the full size. (FYI The thumb is to get quick page loading speed ...
3
votes
1answer
222 views

How do I delete all generated images from my server except those currently used in posts

I have a new set of image sizes for my site's in-development theme. My server is filled with old image sizes, most of which have never been used. You've heard this one before, right? The Question How ...
1
vote
0answers
20 views

Delete original attachment files after editing

I am looking to obtain an certain workflow using WP Media Uploader and Image Editor and I am getting a lot of generated images that I do not need and I do not want to keep them. You can see in the ...
1
vote
0answers
50 views

What is the best way to store thumbnails for a non-image attachment?

I'm in the process of extending Document Gallery to support generating and displaying thumbnails for each document. I've got thumbnail generation under control, but I'm curious as to what best ...
0
votes
0answers
338 views

Delete associated thumbnails when calling wp_delete_attachment

I have a somewhat straightforward script that allows users to upload their own avatar from the front-end. Another script allows them to delete their avatar, before uploading another. The ...
1
vote
0answers
209 views

How to create resized versions of images added with wp_insert_attachment

I'm uploading images to my media gallery and setting them as my post's featured image, which is working quite well. I'd like to generate thumbnails of these featured images, in the same way that ...
0
votes
2answers
694 views

How to get thumbnail from post attachment in this loop

I use this code to display Most popular posts based on view count, but I dont have images in post content I have all images attached to post via attachment (gallery) How to replace this "thimthumb" ...
0
votes
1answer
817 views

Post Gallery list attachments except the one used as post thumbnail

I'm doing gallery in a single post after the post thumbnail. So I list all the post attachment with the image type (with the following query) but I want to exclude the post thumbnail. global $post; ...
3
votes
3answers
3k views

Can I attach a document (eg: PDF) but have a JPEG as a thumbnail?

Is there a built-in feature or plugin that allows you to attach a document to a post or page such that the actual attachment file is one thing (eg a PDF) but the thumbnail images are another (eg a ...