Questions tagged [post-thumbnails]

Post Thumbnail is a theme feature introduced with Version 2.9. Thumbnail is an image that is chosen as the representative image for Posts, Pages or Custom Post Types.

Filter by
Sorted by
Tagged with
0 votes
0 answers
22 views

How can I scan my entire site for every image to know each image's size and dimensions and url?

A client wants to know the size and dimensions of every image on their wordpress site and where they are located (URL). I'm a jr developer tasked with this and I truly have no idea where to start. I ...
MJC's user avatar
  • 1
2 votes
0 answers
55 views

How do I display a PDF thumbnail as a link to the PDF without uploading the image

When I found a couple of years ago that WordPress will create thumbnails of uploaded PDFs, I was so happy, thinking I wouldn't have to make and upload separate PDF cover images to have a thumbnail ...
bkepl's user avatar
  • 21
0 votes
1 answer
30 views

Featured image on page is not displayed with certain theme: how to debug this?

If using certain theme, featured images on the content type "page" aren't displayed. Content type "posts" displays featured images with this theme. And other themes display ...
Evgeniy's user avatar
  • 101
0 votes
0 answers
26 views

Unable to get the correct URL using get_the_post_thumbnail_url() in wp-admin

I've added some custom fields to a rest route. I want to retrive the post thumbnail for my CPT and I'm using this code: This is the code I'm using to add the post meta to the CPT after an image is ...
ICTDEV's user avatar
  • 113
1 vote
1 answer
18 views

Featured Video replacing Featured Image

I am trying to create a list of an "animation" post category, where each of these posts has a video associated with it. I want the video to be accessible inside the post itself, of course, ...
The Feadow's user avatar
0 votes
0 answers
8 views

How to upload multiple images to use as gallery in Kirki Framework

I am using Kirki Option framework which works like charm in most cases, I recently shifted from Redux framework. I have a section in my website for the gallery, I want to upload multiple images using ...
Milan Bastola's user avatar
0 votes
0 answers
61 views

Site Logo is overriding my post featured image on Social Media

Using my site logo is necessary for my website header/header image to propagate properly on all formats. Unfortunately, when active, it overrides any featured image for a new post whenever the post is ...
1st  Goal Web Solutions's user avatar
0 votes
0 answers
16 views

Set Featured Image Automatic From Webp Format

I am trying to set the featured image (webp) from post content to automatically set as featured with the following code in functions.php Auto add featured image function ...
user102195's user avatar
0 votes
1 answer
56 views

Restricting Image Upload Sizes using 'wp_handle_upload_prefilter' - Stuck media progress bar when Featured Image?

I have grabbed this function and adjusted it to my needs. add_filter( 'wp_handle_upload_prefilter', 'check_image_dimensions_during_upload' ); function check_image_dimensions_during_upload( $file ){ ...
dekkyd's user avatar
  • 5
0 votes
0 answers
11 views

What to input into table header to import featured images with CSV or XML file?

I'm using the Really Simple CSV Importer plugin and what to import featured images in bulk for my content items. I've tried multiple combinations like: post_image post-thumnail What could I put into ...
Bruno  Vincent's user avatar
0 votes
1 answer
319 views

Get the featured image of an ACF relationship field

I have an Advanced Custom Fields field group with ID group_61318c077c7d6. I've made this field group visible for Block = 'slider'. In that field group is a field with ID field_61318c078a746, a ...
Steve's user avatar
  • 1,677
0 votes
0 answers
212 views

Adding multiple featured images on custom post type with Avada Theme

I have a custom posttype called "mitglied". I use ACF Pro to add the featured image on the single mitglied custom posttype with _thumbnail_id. I use the Avada Theme, and Avada supports ...
LovinQuaQua's user avatar
1 vote
0 answers
28 views

Extend file format support for post thumbnails

I am trying to enable video thumbnails for posts in my theme. I created a custom post thumbnail media uploader in an editor plugin as follows (This is necessary, because the default uploader can't ...
TimMKuehle's user avatar
0 votes
1 answer
27 views

Hot to change resized image link on posts

I have 5000+ posts therefore could you help me to change url link addresses of images on posts as below? I want to change the urls of resized images to their original url. Before: asd.net/wp-content/...
Korhan's user avatar
  • 1
0 votes
0 answers
17 views

I want to resize post featured image without cropping image. How?

I want show post featured image on different page in different size but image in not showing full. Also, do not want to crop image. I am adding an link that what type of work I want do. Example When ...
First Guide's user avatar
0 votes
0 answers
54 views

Display only posts with thumbnails

I'm trying to have a WP theme display only posts that have a thumbnail. Below is the code of the file that shows some posts on the frontpage. I've already tried to change the code (please see the //...
Johnny Bravo's user avatar
1 vote
1 answer
126 views

wp media regenerate says "no regeneration needed" whe that's no the case

I'm trying to generate thumbnails for a PDF attachment. Right now in the uploads/ folder there is only the PDF file, no image thumbnails related to it. But when I run the regeneration with : wp media ...
mike23's user avatar
  • 5,951
0 votes
0 answers
10 views

Close featured image modal windows with JS

I'm developing a plugin which let you select a fectured image for a post from an external resource e.g. an API When I select an image, I want the image select window to close. I have tried with: wp....
Alejandro Galache's user avatar
0 votes
0 answers
11 views

Crop custom image size vs actual size

I need to use specific image size with add_image_size to true using ACF image field and wp_get_attachment_image From this side, my image is displayed well and resizes well in 175*200. I would like to ...
Thica's user avatar
  • 15
0 votes
1 answer
47 views

Images thumbnail not cropping square

I'm trying to create a related post file with squares images. In the functions.php I've added the following code: function my_theme_setup() { add_theme_support('post-thumbnails'); // Add ...
Mari's user avatar
  • 11
0 votes
0 answers
46 views

Place the Featured image on a post, before the first <h2> via code

I'm making a custom theme andar I need to place the featured image, right before the first of a post, via code. I don't know if it's even possible. The idea is, somehow, in the loop, get the first ...
Zagaz's user avatar
  • 11
0 votes
0 answers
7 views

Edit multiple posts featured image

Actually I imported posts from my another website, but I have only posts & their authors & their category & featured image is showing blank means not present. Now at every time I have to ...
SK 4912's user avatar
0 votes
0 answers
19 views

Is there a way to upscale a media library original image to the nearest whole pixel in Wordpress?

I noticed today while manually regenerating thumbnails for images in the media library that at least one would not generate thumbnails for those sizes that had the same width as the image. In fact, ...
lovewpdev's user avatar
0 votes
2 answers
244 views

website images getting corrupt automatically

I have just migrated my website from hostinger to hostinger manually. And now when I upload any picture on my website the photos getting corrupted automatically. Although the picture was shown on my ...
GULSHAN's user avatar
1 vote
0 answers
40 views

Why not attaching images after impoting using wp cli

I want to move posts from one site to another, because of the big amount of posts I am trying with wp-cli import. The destination site also has huge amounts of posts, now when I am importing XML files....
Mi2's user avatar
  • 11
0 votes
0 answers
22 views

Wordpress pointing animated GIF images with wrong file name upon upload (GIFs animation not working)

y’all! How are you doing?! I’ve been struggling with animated GIF images on my website for a while now, and I discovered the problem, but not the solution, still. When I upload an animated GIF as a ...
carvalhomanzon's user avatar
1 vote
1 answer
150 views

medium_large image size not displaying properly on the frontend?

I have added a code snippet to utilize the "medium_large" thumbnail size. This works fine on the back end and I can select this image size in all image blocks. It also seems to output the ...
GregF's user avatar
  • 11
0 votes
1 answer
177 views

set_post_thumbnail or media_sideload_image adds image multiple times in media library

I am trying to add the featured image to posts and that works, however, the featured image is apparently set everytime I check my post. <?php $post_id = get_queried_object_id(); $bla = "...
Johan's user avatar
  • 309
0 votes
1 answer
132 views

How to I remove Featured Image from the Posts/Category Lists?

It seems like this should be easy, but I do not see an option to exclude the featured image from the category index pages, or posts index pages (whatever they are called). Here is an example of the ...
jligda's user avatar
  • 3
1 vote
1 answer
1k views

How do I work with responsive images in Wordpress? (img srcset/sizes)

I'm trying to make a Wordpress theme and I'm very confused about how I should use responsive images. Here's how I'm currently displaying each thumbnail in my post list: <? the_post_thumbnail() ?>...
Hubro's user avatar
  • 141
0 votes
0 answers
37 views

get_post_thumbnail_id() not getting correct featured image after post edited

Hy, everything works fine until I change featured image by editing post, using wp_get_attachment_image_src(get_post_thumbnail_id($post->ID),"full") I get the url to the original picture, ...
Josip Bogdan's user avatar
0 votes
2 answers
116 views

Import alt text in set_post_thumbnail

I am using set_post_thumbnail in order to programmatically attach an image to my posts. I was wondering how to set a different alt text for this image, for every post, meaning that the same image ...
NBgr's user avatar
  • 11
0 votes
1 answer
7 views

Why some images are not allowed to be edited only for thumbnails?

please see this: As you can see, on the right columns I don't have the classic 'apply to' radios, where you can choose to apply modifications only to thumbnails. It happens only with certain images, ...
Luca Reghellin's user avatar
0 votes
2 answers
31 views

Regarding to the performances, should I check if a post has a thumbnail before or after checking if is the front page (or single page, etc.)?

Regarding to the performances, and the performances only (and not from the point of view of the readability of the code), is it a best practice to check if the post has a thumbnail before to check if ...
PhpDoe's user avatar
  • 197
0 votes
1 answer
56 views

the_ID & wp_get_attachment_image_src(the_ID(), "medium") blank

Using: $my_query->the_post(); $thumbnail_arr = wp_get_attachment_image_src(the_ID(), "medium"); $thumbnail = $thumbnail_arr[0]; $thumbnail is outputting a blank value. If I echo the_ID() ...
Steve's user avatar
  • 1,677
0 votes
0 answers
350 views

In my wordpress admin panel Suddenly The Category, tag and featured Image Option are not showing

In my wordpress admin panel Suddenly The Category, tag and featured Image Option are not showing. I write blogs in my wordpress blogs but suddenly there are missing three options for adding The ...
Md. Sabbir Al Mamon's user avatar
0 votes
1 answer
100 views

image_size with respect to aspect ratios

I have image assets that I load externally and insert programmatically. There are 3 different asset classes: landscape, portrait, and 1:1 The default image_sizes are creating a lot of clutter that's ...
Fluxian's user avatar
  • 130
0 votes
1 answer
587 views

Remove default Image Sizes

I'm trying to remove the default image sizes that are created given a specific image size threshold. Listed using this: get_intermediate_image_sizes() // thumbnail [1] => medium [2] => ...
Fluxian's user avatar
  • 130
0 votes
0 answers
23 views

Strange image artifact on font-page thumbnail image

There is a recent post published on the front page of our website, midstory.org, titled "Toledo’s Jazz Scene Is Roaring Once Again". When viewed on a 1008p screen, there is a thin colored ...
Jason O's user avatar
0 votes
0 answers
15 views

How home my code doesn't display any feature image? Looping through post from a taxonomy and not getting feature images back

The only thing I am trying to do is just to display each post from Services that belongs to the taxonomy called 'national' and display its title and its featured image. So far it displays each title ...
fjimenez's user avatar
0 votes
1 answer
97 views

How do you add a featured image to a page (not post)?

There's no "add featured image" in the settings section in a page I created. On the other hand, a similar blogpost I created has this setting. I went over some websites which told me that I ...
Rakshith's user avatar
0 votes
1 answer
22 views

if custom field doesn't exist, use post thumbnail instead, as image background

I am trying to modify a code in my theme, but I only partially succeed. I need a working condition, if a custom field is not present, to use the post thumbnail instead, as the background image. if the ...
vyperlook's user avatar
  • 167
0 votes
1 answer
240 views

WP Still Generating 150x150 Thumbnail Size Even After Un-Setting Small Size in Functions.php

I am using following code to prevent WordPress from creating some un required image sizes for my theme and only upload the original size add_filter( 'intermediate_image_sizes_advanced', '...
Suffii's user avatar
  • 201
0 votes
0 answers
49 views

How do I remove lazyloading on the mh-spotlight-widget

What is the easiest way to disable native lazy load without a plugin for a specific widget in WordPress? I can't find anything at all about this question that I could use for functions.php? // XX = ...
Aprilia Parrino's user avatar
0 votes
1 answer
154 views

custom image size not being displayed in loop

I believe I'm missing something on media images. I have created a custom image size with this code: add_image_size( '250-square', 250, 250, true); // cropped I have then uploaded images. When I ...
rudtek's user avatar
  • 5,979
0 votes
1 answer
120 views

add_image_size function not working

In functions.php i have, function university_features() { add_theme_support('title-tag'); add_theme_support('post-thumbnails'); add_image_size('professorLandscape', 400, 260, true); add_image_size('...
Patrick2997's user avatar
0 votes
1 answer
403 views

Bulk-add featured images in posts with no featured image

I have a site with loads of posts (news items). Some posts don't have featured images yet. Adding the images to those posts (few hundreds) is a tedious task. We basically want to add 1 and the same ...
Rick's user avatar
  • 111
0 votes
0 answers
25 views

WordPress stopped generating image thumbnails after changing hosting environment

I moved my WP website from shared hosting, to Digital Ocean LEMP stack droplet. I noticed that thumbnails aren't generated any more for new post featured images, I also tried manually regenarating ...
Arkadi's user avatar
  • 101
0 votes
0 answers
29 views

Need to add a post’s featured image to a section on the frontpage

It looks like I will need to create custom PHP code for this and either add it to my includes directory within a custom PHP file, or to the functions.php file. I need the ability to use a featured ...
Ron TheWebDev's user avatar
0 votes
1 answer
242 views

Automatically add images to a menu

I am calling a menu into a page, but I want to add images next to the title of the menu items. I have this code: <ol> <?php $navMenu = wp_get_nav_menu_items(2096); /*/Pass Nav Menu_id or ...
vyperlook's user avatar
  • 167

1
2 3 4 5
33