Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [thumbnails]

Automatically generated smallest size of an image.

1
vote
1answer
5 views

Media Gallery Upload Thumbnail Compression is Changing Image Hue

When I upload an image to my media gallery, all the image sizes that are generated are discolored. Here's an example. This is the full-size image: And now here is one of the smaller image sizes: ...
1
vote
2answers
4k views

How To Add and Display Category Image

I have created a WordPress plugin to create a widget area to display category names (total nmbr of post) and description.Now I want to show the category image just after the category name and after ...
0
votes
1answer
2k views

Pictures won't display in media library and also won't show preview when selected

I have done the plug in, check permissions (upload folder which contains files for the media contents is 755), clearing cache (there was none, apparently), disable any extra plug-ins, check and ...
0
votes
1answer
18 views

how to post default thumbnail if post not created yet

I want to show a default thumbnail if a custom post not created yet. Here is my loop: <?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?> <?php if ( ...
1
vote
2answers
501 views

Image Quality Thumbnail Compression in Wordpress?

I’m lost I don’t know where to turn. I am trying to get my thumbnails to NOT be compressed at all. My uploads are nice and colorful, but the thumbnails gets very visibly duller and poorer quality. I ...
0
votes
1answer
544 views

Get a different size of Image thumbnail while working with custom metabox

I am using custom metabox for a page in my new project, I am using it for uploading image, and attaching it to the page. It's working fine, I can select image or upload the image using WordPress' ...
2
votes
4answers
518 views

Detect if image file is a thumbnail

I want to be able to detect if a file at a certain path is a WordPress generated thumbnail. The only distinguishing feature of the WordPress thumbnail, as far as individual files are concerned, is ...
0
votes
1answer
33 views

get_the_post_thumbnail_url('full') returns empty from custom post type

I'm trying to display the full size image of the single post from a custom post type that I created, below is what I've tried <?php $args = array( 'post_type' => 'press', 'order' ...
0
votes
1answer
26 views

Clickable product image with hover effect

I have a theme with woocommerce. Some products have more than one photo, and when user hovers over such products, those photos (that are in the photo gallery) will rollover. I want to make the ...
0
votes
0answers
16 views

Post Thumbnail: Is there a possibility to add a description to the meta box? [duplicate]

Probably many of you are using the Post Thumbnail feature: https://codex.wordpress.org/Post_Thumbnails I wonder if it is possible to add a description to the post thumbnail meta box in the admin area....
0
votes
1answer
2k views

How to change the thumbnail size to a specific category?

I am using thumbnail on my blog posts. I added the following code in my functions.php for that purpose add_theme_support('post-thumbnails'); set_post_thumbnail_size( 328, 228, true ); It's ...
1
vote
1answer
325 views

how to link post-thumbnail to original img in a lightbox?

I have a page showing custom post type, but I don't know how to link to the full size image that can be opened by a lightbox plugin. the post page is like: <div class="content" id="main-content"...
0
votes
0answers
17 views

Can the WooCommerce image sizes be removed?

Is it safe to remove_image_size() on WooCommerce's built-in image sizes (woocommerce_thumbnail, woocommerce_single, woocommerce_gallery_thumbnail, shop_catalog, shop_single, shop_thumbnail)? I'd like ...
0
votes
1answer
509 views

the_post_thumbnail returns full sized image, how to debug?

This is a weird situation. I have defined add_theme_support('post-thumbnails'); add_image_size('190x280',190 , 280,true); add_image_size('400x600',400 , 600,true); Uploaded images to post as ...
0
votes
1answer
23 views

Thumbnail images missing in WP media library

I have built my own WordPress theme and applied it to my WordPress website. The issue I am having is out of the blue, the thumbnail images from the media gallery have stopped loading in and now just ...
1
vote
1answer
20 views

Get thumbnail url of custom meta image?

I have a line in my child theme as follows: $bg_image = wp_get_attachment_url( get_post_meta(get_the_ID(), 'bg_image', true) ); It successfully provides me with the url of the image stored in the ...
0
votes
1answer
13 views

I cannot upload images to post or the media library in wordpress

Whenever I try to upload featured image for a new post or edit featured image of the older post, the following errors comes up: An error occurred in the upload. Please try again later. Here I have ...
0
votes
0answers
50 views

Force WordPress to strip/remove EXIF/IPTC metadata when resizing thumbnails

I am using Imagick with WP 5.0.3. Since version 4.5 WordPress use Imagick to create/resize thumbnails and it keeps EXIF/IPTC metadata (using GD, metadata are removed). WordPress keep EXIF/IPTC ...
0
votes
1answer
401 views

How to change product thumbnail size in storefront theme

I was trying to display product thumbnails in 230px (as per recommendations by GTmetrix). Since, I am using storefront the default value is declared in storefront/inc/class-storefront.php The code ...
0
votes
1answer
98 views

Change WooCommerce Image Size in One Product CAtegory

I have one Product Category that needs to have 300 x 300px uncropped thumbnail images. All of the other products have 300 x 300px, cropped thumbnails. This would be on the Shop page and the Category ...
0
votes
2answers
24 views

How to reduce unnecessary thumbnail creation?

On a site that has many different image sizes each time an image is uploaded all the different thumbnail sizes are created causing a fair bit of bloat. What would be the best way of optimising this ...
0
votes
1answer
6 views

Get thumbnails with array sizes parameter

I am trying to get both full and thumbnail images from post with wp_get_attachment_image_url: wp_get_attachment_image_url( get_the_ID(), array('thumbnail, full')); I know that by default size is ...
0
votes
2answers
1k views

Adding thumbnail to search results & changing content.php

Looking to discover how to alter my content.php code to add the thumbnail image of the specific posts to my search results located here for example: https://divesummit.com/?s=suunto&submit=Search ...
0
votes
4answers
52 views

How can I server scaled images?

I am working on an eCommerce website, with WooCommerce powering the shopping side of things. The website has a 'Recent Reviews' Widget, within the Footer. As well as the Review itself, it also ...
0
votes
2answers
1k views

How to use thumbnail size of image if I'm only using src to get image

I have a custom field for an image, and using it this way: <?php $item_img = get_sub_field('image'); ?> <img src="<?php echo $item_img ?>" /> But I want to use the thumbnail ...
0
votes
0answers
97 views

Remove product category placeholder image (Woocomerce)

I'm trying to get rid of placeholder product category images on the shop page. Right now I'm using this code to add a .no-image class to products that don't have an image so I can style them ...
0
votes
2answers
880 views

Disable Media File Image Link On Mobile Devices

I'm looking to disable the 'media file' image link on mobile devices, so that when viewing a site on mobile devices we simply have the image being displayed with no link to anything. I am looking to ...
0
votes
1answer
20 views

RSS feed site image custom resolution

I want to update the resolution of my site image for my RSS feed. Right now it is 32px. How can I update the resolution without plugins? <image> <url>https://evenwerk.com/wp-content/...
0
votes
0answers
77 views

Woocommerce shows product images in the wrong size

All products in my website have 200x200 featured images. But in catalog images are shown in 750x750 (sooo blurry) instead of 200x200. Source code of catalog page: <img width="200" height="200" src=...
0
votes
1answer
6 views

I want to use a product thumbnail completely different than the product image

I want to use a product thumbnail completely different than the product image. I've tried to search on google but all solutions lead to just customization of thumbnail sizes.
0
votes
0answers
20 views

How to filter on placeholder image

I'm using the woocommerce-auto-category-thumbnails plugin to replace a blank category thumbnail with a random thumbnail from one of the products in the category (or child categories). It is supposed ...
0
votes
1answer
18 views

How to set featured image as background for a specific category?

I am currently trying to set the most recent post's featured image to be the background of my hero image. This is the code I'm using: <?php $backgroundImg = wp_get_attachment_image_src( ...
15
votes
6answers
14k views

How to disable WordPress from creating thumbnails?

I've been looking around the net for a long time on how to disable WordPress from creating multiple thumbnails. I've seen in most tutorials to set all the images to 0 in the media section. I have ...
0
votes
0answers
11 views

How generate thumbnails with background job

We have a situation, there are 40 images size registered, thumbnails are being generated as soon as the image is uploaded. This is causing a delay for 30-40 seconds on uploading+thumb-nailing. What ...
3
votes
5answers
4k 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 ...
10
votes
1answer
7k views

the_post_thumbnail responsive srcset not populating with custom image size

I am trying to use the new responsive images feature in Wordpress 4.4 but I keep running into a particular problem when trying to use the_post_thumbnail with a custom image size. It seems I cannot ...
0
votes
0answers
22 views

Storing video thumbnails

I need help. When I add new post with video I want to download the thumbnail of the video to wp-content/upload. I tried using wp_handle_upload() function but i am not sure if it is correct and i am ...
0
votes
0answers
34 views

Why image Thumbnail url is not displaying with custom size?

The website has only one thumbnail size 375x211. I want to show this size thumbnail image at site homepage so that when I copy this image it only copies in 375x211 size, not in full image size which ...
1
vote
1answer
2k views

How to fit image to Thumbnail canvas size?

I need to upload images with a different orientation (portrait and landscape) and I don't want to crop post-thumbnails. But I need always thumbnail size 250x250px. If I upload a portrait oriented ...
0
votes
1answer
3k views

Dynamically determine the width and height of a image file to be cropped & uploaded AFTER form submission given fixed aspect ratio

I know that I can use the add_image_size() function in the function.php of the theme to pre-determine the additional desired image file of specific width & height to be cropped and uploaded. ...
-1
votes
2answers
940 views

Thumbnails are not cropped even after selecting “Crop thumbnail to exact dimensions”

I am moving Wordpress site from one domain to another. In the old domain the WP version was 3.5.2 while in the new domain WP version is 3.8.1. There is a page named "2002" which just contains an ...
2
votes
1answer
37 views

How to link to YouTube videos with thumbnails?

I am brand new to WordPress and find it very confusing. I have a small blog and cannot find a way to easily add a small grid of YouTube thumbnails that link to those videos. I have looked at all ...
1
vote
0answers
11 views

Thumbnail position + size

Good afternoon, I'm currently having a home page with a header and a footer. I would like to show the last posts there with a thumbnail plus an excerpt under it. The thing here is that I want to ...
1
vote
0answers
14 views

Why are some thumbnails on their side - but correct when I go to edit image? [closed]

Some thumbnails are on their side- when I go to edit the image the picture is correct and if I try to rotate it will not
2
votes
2answers
2k views

Additional image sizes are not being generated

When I upload an image through the admin interface, the image is only saved at full-size. The other sizes are configured to their default values in Settings > Media. The automatic resized versions are ...
2
votes
0answers
30 views

Save image as featured image

I am using WordPress 4.9.7 and I am trying to develop a plugin that downloads an image from a website and saves it in the media library and sets it as featured image on a post. Find below my full ...
0
votes
0answers
29 views

How can i auto generate thumbnail Image for Video in WordPress

I want to auto generate thumb of the video which is in media of WordPress. What I want is when I press publish button then it is set as a featured image of the post. Any idea how can I to do this?
0
votes
0answers
42 views

Delay WordPress auto thumbnails generation for specific image size i.e. 'medium'

I am trying to delay WordPress auto thumbnail generation for specific image size only i.e. 'medium'. As I am using GD library to print Post Title on the image automatically, and it replaces the ...
4
votes
1answer
6k views

How to Delete All regenerated thumbnails but keep the original ones?

I have a WordPress site which used to weight around 350 MBytes. Then I changed the theme and found that I have to regenerate the thumbnails. So I did it, Twice actually, but Now the problem is that ...
0
votes
0answers
65 views

How to tell woocommerce slider to use thumbnails

I am using the most recent wp and woocommerce. I have a carousel slider on my frontpage which is listing my featured products. In order to decrease the loading time, the carousel should render "...