0
votes
1answer
23 views

Generate responsive post thumbnails of same size

I am using a function to display related posts in my wordpress theme with their thumbnail. I am using uikit to make my theme responsive. Uikit offers a grid feature similar to the bootstrap one, and ...
0
votes
1answer
65 views

add_image_size() and uploading the exact size leaves 1x1 image in uploads

I've added an image size of 370x150 which works, but if I upload an image to those exact dimensions get_post_thumbnail() no longer works as expected. If I look into my uploads folder I'll have a ...
0
votes
0answers
56 views

get the post thumbnail returns the full size

The function get_the_post_thumbnail($post->ID, 'thumbnail'); not always returns the thumb size of the image (which is 100x100) for some posts it does but for most of them it doesn't. Even though ...
0
votes
1answer
67 views

WordPress not creating “large” thumbnails

I moved my WordPress installation from my local dev environment (MAMP) to a shared hosting server. Since then I have trouble with image uploads not being processes as before, especially with the large ...
0
votes
1answer
34 views

Is wordpress compressing my images? if so, how to prevent it?

I am using 'featured image' fields in my post and the images are sized and compressed already but whenever I upload an image that has some text, I keep noticing the image reduced in quality ...
-1
votes
1answer
37 views

add if statement to the featured image

I have a featured image. I want to add an if statement to the size. For example, if the featured image height exceeds 500px I want to add something. Is that possible ?
0
votes
1answer
57 views

How to disable thumbnail filter for a specific template part or image size?

I am filtering post_thumbnail_html in my theme to modify the output of my image tags. I have one template part that I would like this filter not to apply to. It uses an image-size that is used no were ...
0
votes
0answers
49 views

How to set a Maximum Image size to a Field in WordPress

I have a customized frontend form in WordPress that allows to set a featured image to a post before publishing it. I want to set a maximum-allowed "width" as well as a "height" to the "upload image" ...
1
vote
0answers
215 views

“Medium” size image displayed instead of “thumbnail” in only one post, other posts are fine

Please take a look at this cicada photo - http://photo.aseev.com/stock-photo/cicada-exuviae/ - below you will see 5 thumbnails, all of them are squared, except one (a bug on white background). It is ...
1
vote
2answers
3k views

set_post_thumbnail_size vs add_image_size

What is the difference between set_post_thumbnail_size and add_image_size? Is set_post_thumbnail_size for all images, and add_image_size for sizing images individually? Thanks.
0
votes
0answers
195 views

Full size image option removing problem

I have removed the Full size image option from the media upload window see Code: function theme_t_wp_set_image_size_options( $sizes ){ $sizes = array( 'thumbnail' => 'Thumbnail', ...
0
votes
1answer
680 views

Display post thumbnail in foreach loop

I am trying to display a thumbnail in a foreach loop. The thumbnail is a new image size I have added called "plant-thumb". I have all the desired elements displaying properly except for the thumbnail. ...
0
votes
0answers
41 views

wp_get_attachment_image_src match smallest edge

I'm trying to get the minimum image source that fills the given size. wp_get_attachment_image_src(get_post_thumbnail_id(), array(180, 180)) gets the image which fits the size and not which fills it. ...
0
votes
2answers
84 views

How to get the image sizes, in a function, as per the sizes mentioned in the media settings?

I'm making a custom function for my WordPress site. function mediumFeaturedImage() { if ( has_post_thumbnail() ) { ?> <a href="<?php the_permalink(); ?>"> <?php ...
0
votes
1answer
131 views

Custom image sizes are not used

I recently launched a new theme and regenerated all the thumbnails with AJAX Rebuild. All of these custom image sizes are defined in my functions.php as well as the individual template files in which ...
0
votes
1answer
451 views

Thumbnails Not Generating

Ok, So this is a weird issue...WordPress doesn't generate thumbnails, I have my image sizes set and everything...I'm pretty sure it's related to my custom posts type code (see below) because when I ...
2
votes
1answer
3k views

No Thumbnails Generated

I setup WordPress on my own server and it's up and running...one thing that I have noticed is that WordPress doesn't generate any images I upload. Usually when I upload an image through WordPress it ...
0
votes
2answers
247 views

the_post_thumbnail('medium') still gives thumbnail-size img

All the sources mention this as if it worked. Medium size is set to 635x194, but I still get this out: <img width="100" height="100" title="fjaril" alt="fjaril" class="attachment-thumbnail" ...
1
vote
1answer
2k views

How to scale image with equal width and height without distortion?

I have a section on my frontpage that querys through recent posts and grabs the title and thumbnail of each. In my functions.php, I've specified a width and height for the thumbnail using: ...
2
votes
1answer
3k views

Convert uploaded PNG to JPEG automatically

Is there a way to convert automatically uploaded PNGs to JPEGs and keep the original? In other words, let the user upload a PNG, but show in wordpress (thumbnails, large, medium, etc) the JPEG version ...
0
votes
1answer
84 views

add_filter with specific thumb names

How would I run add_filter only on some specific registered thumbnail sizes '$size' ? like 'large' , 'medium', etc?
2
votes
1answer
180 views

Why are extra 92 pixel square thumbnails created?

Disabling this WordPress feature which automatically generates various sizes of an uploaded image, is normally as simple as going to WordPress Dashboard > Settings > Media screen and changing all ...
10
votes
5answers
2k views

Minimum Dimensions Requirement for Featured Image?

I am creating a baseball website with multiple Authors. From past experience, no matter how well you know someone personally, it doesn't mean they will follow or even read your instructions. That ...
2
votes
3answers
2k views

Showing a placeholder/default img, if no featured image is set

I need to modify the following code to show a placeholder if there is no featured image available. I understand that I need to add a if statement in the following code but wasn't sure of the exact ...
0
votes
3answers
2k views

How can I get a different image size, if all I have is the link?

For various reasons, I can't use Wordpress' built-in Thumbnail functionality. What I want to do instead is to use the first image in the post as the thumbnail. Here's what I found in the codex: Show ...
8
votes
1answer
1k views

How to disable generation of default image sizes for some custom post types?

I used custom post type, where 'thumbnail', 'medium' and 'large' sized not required. I need to disable this sizes and create function or plugin, where i can set, which image size is required for each ...
7
votes
1answer
3k views

How to Dynamically Resize WordPress Image On-The-Fly (custom field/theme option)

So - at a client's request, I am in need of being able to resize an image not the standard WordPress way... but from an image pulled-in from a theme option. I can't simply use the custom_header area, ...
4
votes
1answer
528 views

Featured image with the same height thumbs returns wrong thumb

I have 2 sizes thumbs for featured images with the same height: 300 x 200 540 x 200 I've checked the uploads folder and both thumbs with different sizes appear correctly: file_name-300x200.jpg ...
2
votes
1answer
2k views

How to create thumbnails with a fixed width, so all of them will have the same width?

right now, a thumbnail will be either 150px in height or in width, depending if it's landscape or portrait. Is there a way to make them always the same width and scale them in height accordingly, ...
6
votes
6answers
2k views

Display thumbnail only if requested size exists

When I use the functions that get and output the post thumbnail, they will display the requested thumbnail in the size you specify, but if this size doesn't exist they will display the thumbnail in ...