A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [thumbnails]

Automatically generated smallest size of an image.

Filter by
Sorted by
Tagged with
0
votes
1answer
15 views

Add custom version to an image

I have scoured the web for plugins and articles to help me solve something that seems pretty basic, but couldn't find anything. I want a way to create custom versions, particularly sizes, of an image ...
0
votes
0answers
22 views

can i use specific images for thumbnails in post?

How do I use get_post_thumbnail_id for specific posts? I want to manually create a field with the ACF plugin and add it to the image post and replace "get_post_thumbnail_id". <?php if ( $the_query-...
0
votes
1answer
93 views

Disable wordpress image sizes generation

I'm trying to disable image sizes generation in wordpress. When I use: print_r( get_intermediate_image_sizes() ); it shows: Array ( [0] => thumbnail [1] => medium [2] => ...
0
votes
0answers
15 views

Why does my site download two different versions of the same image?

On both my homepage I have a masonry layout with thumbnails. These are lazy-loaded by JetPack. I noticed that for every thumbnail, two images are being loaded. One with a request url of https://i2.wp....
3
votes
2answers
119 views

retrieve thumbnail from post ID of best selling product in category

The code below displays product category names, links and their thumbnails on hover. The thumbnails ($image) retrieved are those manually set via the woocommerce product category menu. I am trying ...
1
vote
1answer
20 views

hover image appears below placeholder instead of overlayed

I used padding-bottom calc to stop my text jumping around while the placeholder loaded. This worked, however the hover image which is supposed to display over the top of the placeholder, now appears ...
1
vote
1answer
100 views

combine Code 1 with Code 2

Code 1 - uses wp_list_categories to list product categories in columns of x categories up to a total of y, with a link to view all categories if there are more than y. Code 2 - Later realising i ...
0
votes
1answer
72 views

get taxonomy thumbnail and use it as a variable in code

Im having trouble trying to retrieve category thumbnails and use as a variable in some code i got from a JSFiddle. It puts a placeholder image as default and displays a category image on hover of ...
0
votes
0answers
23 views

How to pass a YouTube thumbnail URL through the a custom image size

I'm currently displaying YouTube thumbnails directly from YouTube using this format which works: <img src="http://img.youtube.com/vi/<?php echo youtube_id; ?>/maxresdefault.jpg" /> ...
0
votes
0answers
32 views

wp-cli wp media regenerate --only missing deletes unused sizes?

I just ran wp media regenerate throught 200k images... thing is I have 400k, and the range command is not working (200000 400000 | xargs ***) If I use wp media regenerate --only missing will it ...
0
votes
1answer
19 views

Disable globally “Crop thumbnail to exact dimensions (normally thumbnails are proportional)” with Multisite

I would like to disable the "Crop thumbnail to exact dimensions (normally thumbnails are proportional)" function for all blogs in my WordPress Multisite setup. This function is available in Dashboard,...
0
votes
0answers
27 views

Cannot display wordpress thumbnail

I wrote a simple Wordpress Plugin that upload all images inside a folder located on another server. The uploading process is working well, but for some reason when I go inside Library I have a blank ...
0
votes
0answers
25 views

ADD class to all my images (thumbail)

I have a xxx web like xvideos for example. And I want to add a class to my thumbail images because I want to indicate that the pop up add only will active when they click in these images. So, i have ...
0
votes
1answer
53 views

Custom Post type slider with thumbnail navigation

I am trying to make a slider for a custom post type with quite a few custom fields. Ive got the query and fields displaying fine. But now to get it into a slider Getting each post in the loop ...
0
votes
2answers
39 views

Stop WordPress compressing images? – Quality is terrible

I understand WordPress creates smaller versions of the original image file. These versions are blurry in comparison to the original which is a big issue as a photographer. I set up this page you can ...
1
vote
1answer
24 views

How to stop wordpress always displaying full-res images

Currently, my website is over 56mb just on the home page... I have 5 images, it's far too large and is killing the speed. Is there a way to make my site only display thumbnails or is this always ...
0
votes
0answers
23 views

Error 500 in loop to create posts and thumbnails

I'm using this loop to read a folder, and create a custom post with the basename info. But, around 20 images, the response is a error 500 and the process stops. I'm looking for some tip to do this ...
0
votes
0answers
37 views

When upload a PNG a noise appears in the thumbnails

Since we updated wordpress something strange has happened. We have a woocommerce where products have different color options for each part of this, and when you select a color, the image with that ...
0
votes
1answer
30 views

Overriding of the template for the Attachment “thumbnails” in the Media Grid isn't working

I'm trying to customize the template of the Media Browser (when clicking on "Add Media" button within Edit Post page), by adding a caption with the filename on each thumbnail so I don't need to select ...
0
votes
1answer
74 views

Show Post Thumbnail In Custom Post From Other CPT

I have a 'Match' CPT to create posts for each game played by a football team. These posts display details of the opposition team by pulling through information from the appropriate post from another ...
0
votes
0answers
21 views

srcset for images does not work

I have a web store and I recently updated the theme of the site, when I see the images of the store were not displayed, inspecting in the browser console I realized that the image in "src" was correct,...
0
votes
0answers
20 views

How to view exact image dimensions of a media in Admin view?

I know programmatically we can see the attachment sizes in templates, but I'm looking for a way to see the precise dimensions of the resized medium, large, xlarge sizes too. No plugin seems to do this,...
0
votes
1answer
17 views

Thumbnails are hard cropped not matter what

I'm using WP Job Manager, and would like user-uploaded logos to be resized and positioned to fit within a fixed height and width. Currently, my settings are at: When I am uploading the following ...
1
vote
1answer
27 views

How check that there is post thumbnail feature image or not on wordpress?

On my wordpress site , I have some post that all of them have post thumbnail, but their post thumbnail removed from host and now when i want to load them on site , there is no image for loading to ...
0
votes
0answers
55 views

Thumbnails regenerate wp_generate_attachment_metadata

I'm importin pictures via FTP and create custom recorss in mySQL via insert. I'm trying to make a cron job to regenerate thumbnails. This is what i came up to.. but i doesnt work. add_action( '...
0
votes
1answer
20 views

Wp-query and column blocks

Maybe this is asking too much, but the new blocks give a simple way to add columns that work well responsively. ie you can just drop image thumbs into column blocks and they work perfectly on mobile ...
0
votes
0answers
16 views

Featured image size always cropped bottom

Good day! I am trying to add a featured image to my post but every time I add a featured image, the lower part gets cut off. Original size is 300x300 pixels. If the windows size gets changed, ...
1
vote
1answer
21 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: ...
0
votes
1answer
22 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 ( ...
0
votes
1answer
1k 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
370 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
18 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
31 views

Change thumbnail size for Media Library

I can't seem to find a way to change the size of the images in the Media Library. For some reason the full picture is being loaded in the media library, and this makes it really slow. I've tried: ...
0
votes
0answers
117 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
366 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
118 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
169 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
32 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
1answer
376 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
14 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
4answers
126 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 ...
1
vote
0answers
210 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
1answer
34 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
1answer
7 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
31 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
22 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( ...
0
votes
1answer
1k 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
0answers
38 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 ...
2
votes
1answer
46 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 ...