Questions tagged [thumbnails]

Automatically generated smallest size of an image.

Filter by
Sorted by
Tagged with
0
votes
3answers
2k views

Use 'medium' size with catch_that_image() function

I've this function, which I'm pretty sure a lot of you already know: function catch_that_image() { global $post, $posts; $first_img = ''; ob_start(); ob_end_clean(); $output = ...
0
votes
2answers
30 views

Wordpress can't detect any thumbnails size?

Wordpress can't detect any thumbnails size, I re-generated all image but not work. The plugin (Simple Image Sizes) can detected all thumbnails size settings. But when I want to use, it can't detect ...
1
vote
1answer
703 views

If I Regenerate Thumbnails, would WordPress delete the existing Thumbnails and replace them with 'new copies'?

I am currently working on a website, which has 1,000's of Product Images. All of these images were uploaded, without being optimized accordingly. For instance, most of the Product Images were ...
1
vote
0answers
612 views

Change thumbnail image depending product category

Hello I would like to show my last product image as a thumbnail in specific category pages. I would like to keep my general shop page displaying the first image as thumbnail but show the last one ...
1
vote
0answers
332 views

Caption not showing with Woo commerce thumbnails

I am new with woo commerce and i have a task for single product page. I am editing woo commerce > templates > single product > product-thumbnails.php and trying to display caption with woo commerce ...
0
votes
1answer
411 views

Can we use featured image as third party website image URL

In my case we are getting some post list from third party and import in our custom post type. My question is, Is we can use post featured image as third party website image URL instead of upload ...
0
votes
1answer
26 views

how to nest specific category thumbnails inside different containers

im kinda new in wordpress and this is the problem im facing: I've created a custom div with 3 tabs that displays 3 inner containers, each tab is for a a specific "Category". For Example, let's call ...
0
votes
1answer
1k views

Thumbnail is corrupt but image is good

I am using wordpress 3.5 to manage my website with a template (not sure which). Lately, each picture I add to a gallery creates a corrupted thumbnail, but the picture itself shows up ok. I tried ...
0
votes
1answer
227 views

How to restrict wp generate attachment metadata() to certain intermediate image sizes

In Wordpress, we have added our own intermediate image sizes to the standard Wordpress sizes using add_image_size(). Using our own admin interface to upload images, we then use ...
-1
votes
3answers
1k views

How can i give a download link to the thumbnail or featured image

I am using the code below to give users download the thumbnail image, as i have a wallpapers site: <a class="downloadbutton" href="<?php echo $src[0]; ?>" download="imageName">Download ...
0
votes
1answer
74 views

thumbnail crop not working

I've added the following code to my theme's functions.php file: function add_custom_sizes() { add_image_size('featured-thumbnail', 690, 500, true); add_image_size('secondary-thumbnail', 460, ...
0
votes
1answer
226 views

Does Wordpress have a way of changing the 'Natural' size of uploaded images?

So here's my problem: I have a site with several articles on the homepage, these are using the featured image as a thumbnail (roughly 250x250). Then, for a single article (single.php) I'm using the ...
4
votes
1answer
7k views

get_the_post_thumbnail_url with an unregistered size

The official code reference for get_the_post_thumbnail_url states: $size (string|array) (Optional) Registered image size to retrieve the source for or a flat array of height and width dimensions. ...
0
votes
0answers
20 views

Best way to manage theme images

I am currently wondering what is the best way to let the user choose between a certain number of thumbnail size for the shortcodes I am building. add_image_size function is the simplest way but ...
1
vote
1answer
54 views

Is there a way to avoid using add_image_size? Best way to manage images

Currently if you have a theme that use add_image_size for let say 6 different image size you will have 6 different thumbnail created that will maybe never be used. With the current version of ...
0
votes
1answer
2k views

add_image_size not working

I am trying to resize an image using either the following code: add_image_size('poster-full', 450, 9999, false); OR add_image_size('poster-full', 450); I need it to be resized widthwise, and height ...
9
votes
2answers
3k views

Set custom name for generated thumbnails

Is there any filter available to set the naming convention of those auto generated thumbnails? Something like this: thumbnail_150x150.jpg -> thumbnail-s.jpg thumbnail_300x300.jpg -> thumbnail-m.jpg ...
0
votes
2answers
2k views

Cannot upload featured image to a custom post type

For some reason I am not able to upload images OR set the Featured Image on a custom post type in my custom wordpress theme. I have added theme support of post-thumbnails to my functions.php file and ...
0
votes
1answer
355 views

use css for resize image into mobile thumbnail

i use a wordpress plugin (Gmedia galleries) to create galleries, i have problem when i set Thumbnail Width Mobile and Thumbnail Height Mobile to 50 because the image is not centered into the Thumbnail ...
1
vote
1answer
24 views

How to removes all instances of thumbnails displayed in my theme?

basically I'd like all thumbnails mentions to be replaced by an empty string or something like that. Some piece of code I can just add to a plugin or functions.php
0
votes
1answer
415 views

How to filter wp_get_recent_posts() to only posts that have thumbnails?

I made a script that shows recent posts. But here's the problem, I want to show only posts that have thumbnails, and I want to show at least 10 posts if there are that many without thumbnails. So the ...
3
votes
2answers
3k views

Stop wordpress from creating multiple size images

I want wordpress to stop making multiple size images cause it's going to eat up my storage space. So I went Settings > Media and then set all the sizes to 0. When I uploaded a new image it still is ...
1
vote
2answers
1k views

Store thumbnails and uploads in different directories?

I've followed the accepted answer in this question to generate my thumbnails in a custom way. I extended the image editor class as: class WP_Image_Editor_Custom extends WP_Image_Editor_GD { ...
0
votes
2answers
534 views

Showing wordpress latest post thumbnails in slider with auto increment

I would like to show latest posts with its thumbnails only in slider. But my first figure element has a class. Can I apply a class to first thumbnail as it is in html structure below? And then Can I ...
0
votes
1answer
87 views

get_post_thumbnail does not display thumbnail

I'm trying to get a specific post's thumbnail by using the post's ID. I have this code snippet in my index.php file <?php get_the_post_thumbnail(64 , 'post-thumbnail', array( 'class' => 'img-...
0
votes
2answers
901 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
1k views

Regenerate thumbnails for images that are not in the media library

I have a wordpress site that has thousands of images in the uploads folder that are connected to posts in a custom post type. What would be a good way to regenerate these images to create new ...
6
votes
1answer
515 views

Thumbnails of same size with different crop

Is there any way to generate thumbnails of the same dimensions, but with a different crop? I want to do something like: add_image_size( 'thumbnail_top', 360 , 180 , array ('center', 'top') ); ...
-1
votes
1answer
3k views

How to include featured image on blog post preview?

I wanted to include the featured image to the blog posts' preview on the front page, however either I get the entire image with the options of cropping some of it off or I can't have any image on my ...
1
vote
0answers
461 views

hook wp_generate_attachment_metadata does not read all the attachments

I am using GD libraries in order to modify the uploaded attachment so I can have always the crop at the same squared dimensions with white stripes top/bottom or left/right if the image is not squared ...
0
votes
1answer
1k views

Get an image from url, resize it, and save on a custom folder (not the media library)

What I'm wanting to do is this: From a remote image url provided, I want to generate a thumbnail with specific dimensions. Save the generated image thumbnail file only, not the original remote image ...
3
votes
1answer
8k views

Why is wp_get_attachment_image_src returning wrong dimensions? [duplicate]

I am using wp_get_attachment_image_src to construct the srcset attribute of an img tag. In that attribute I want to output a comma separated list of image urls along with the image widths. Using the ...
0
votes
2answers
1k views

Timthumb not working with WordPress 4.0

I just updated WordPress to the latest version, 4.0, and I had a bad surprise - timthumb stopped working. the thumbnails are not generated. I cleared theme's cache folder, and checked to see if chmod ...
1
vote
1answer
500 views

How to move image thumbnails into custom folder for custom post type

I have adapted Philipp's answer here to move all thumbnails to a custom folder. How do we make this work for a particular custom post type? function custom_rename_images($image) { // Split ...
0
votes
1answer
190 views

how to place ELSE on if function on multipostthumbnails? [closed]

Hello guys I am making a featured images but i want IF to have Else, maybe this is an easy question but i am is suffer. I don't know how to change this function to have ELSE if (class_exists('...
0
votes
1answer
54 views

Else/If Statement to Display Photo Descriptions

I am building a news WordPress theme and using the Description for thumbnails to display who the photo is credited to on the website. I am then placing the credits in the Description on top of the ...
2
votes
1answer
8k views

Getting blank thumbnails in media library?

I run a Multisite installation with 10 blogs. All the other blogs work fine except for one where any image that's uploaded does not show up in the media library. There's just a blank image instead of ...
1
vote
1answer
1k views

Image thumbnails not available post migration, but still accessible via direct URL - DB issue

To start with, I'll just clarify that this appears to be a different issue to the numerous migration ones already covered. In short, I've migrated my site to a new domain (both in root, no directory ...
3
votes
0answers
83 views

Saving WordPress generated thumbnails in a subdirectory

I.e. an uploaded image image.jpg is stored in wp-content/uploads/2016. WordPress will generate thumbnails named image-150x150.jpg, image-300x300.jpg, and image-1024x1024.jpg in the same directory. Is ...
2
votes
1answer
362 views

Is it possible to generate JPEG progressive thumbnails?

I noticed the even if I upload a progressive JPEG in Wordpress media when it generates the thumbnails it creates them in baseline format instead of original progressive format. Is it possible to ...
1
vote
1answer
1k views

How to display first post thumbnail as a background image of a widget?

I have a regular WordPress Widget that display few posts using WP_Query I'm trying to find a way to display the thumbnail of the first post as a background image for the entire widget div. Here's the ...
1
vote
0answers
36 views

Disable image thumbnails for only one upload folder

I have a form that is uploading resumé files into a custom folder at /wp-content/uploads/resumes. While I do want thumbnail sizes generated for the regular folders, I DO NOT want sizes generated for ...
1
vote
1answer
587 views

Regenerate thumnails does not create any files

For a webshop running on WooCommerce, I changed the default thumbnail size in WC > settings > products > display to: Catalog Images: 247x247px Single Product Image: 510x510px Product ...
2
votes
2answers
727 views

No srcset for hard-cropped thumbnails

I am using hard-crop on featured images like this : add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size ( 635, 200, true ); I have no other plugin installed, not even Jetpack. No matter ...
0
votes
0answers
2k views

How to install ffmpeg extension for php 5.6.25 for wp video posts plugin?

I have a wordpress project in which I need to install the plugin WP Video Post For this ffmpeg needs to be installed. I have wamp installed on my local wamp server and the version I am using is: ...
0
votes
1answer
274 views

Using Image Sizes for Custom Post Types outside the Loop

I want to use an image size on a Custom Post Type (which has featured image enabled). in functions.php I added: add_theme_support( 'post-thumbnails' ); add_image_size( 'my-non-working-size', 600, ...
10
votes
3answers
12k views

How To Delete Desired Image Sizes From wp-content/uploads?

My default media setting in WordPress blog is 150x150, 300x300, 1024x1024 respectively for thumbnail, medium, large images. Now I am designing a theme that need different size thumbnail images to show ...
1
vote
2answers
877 views

'Thumbnail' and 'Medium' Image sizes are different than expected

In a typical WordPress installation, the size of the thumbnail image is 150x150 and medium image is 600x400. I'm theme developer and I have one client which has different sizes for these. The ...
3
votes
1answer
410 views

Wordpress remove EXIF Data from specific Thumb

Is it possible to hook in to action when uploading and resizing specific size added by add_image_size( 'mini-placeholder', 32 ) for image in Wordpress, and remove EXIF Data, and set quality of this ...
2
votes
1answer
471 views

Changing playlist shortcode thumbnail sizes?

I'm using do_shortcode() to display a custom WordPress audio playlist. By default the playlist will load cover art for each audio file (the attachment's featured image) and change according to what ...

1 2
3
4 5
8