Registers a new image size. This means that WordPress will create a copy of the Featured Image (formerly known as post thumbnail) with the specified dimensions when you upload a new image.

learn more… | top users | synonyms

1
vote
1answer
45 views

Generate image size, based on the image-orientation

I am working on a fairly complex redesign of a wordpress project. Currently I am working on the image implementation. The site is very image heavy and I want to provide the optimal image for each ...
1
vote
1answer
201 views

Regenerate thumbnails after upload

I have this nice little code coming straight from the Wordpress codex if($_FILES['user_picture']['size'] != 0): if ( ! function_exists( 'wp_handle_upload' ) ) require_once( ABSPATH . ...
1
vote
0answers
32 views

Is a conditional image creation with add_image_size possible and which would be the best hook? [duplicate]

I try to get the Picturefill solution described here running with the latest Wordpress install. One thing I wonder is the following. Would it be basically possible to only conditionally create image ...
1
vote
1answer
190 views

Wordpress Media Library showing wrong preview size?

When uploading new (or existing) images to the media library in Wordpress 3.6.1 the preview generated on the admin page/edit media page (eg. wp-admin/post.php?post=8736&action=edit ) is showing ...
1
vote
0answers
67 views

Image Editor does not affect custom sizes!

Recently working with wordpress 3.5, I came across this patch :http://core.trac.wordpress.org/ticket/19889 ...which solved the problem of custom image sizes defined by my theme not resizing or ...
1
vote
0answers
133 views

Conditional Image Sizes for Use via Theme Customizer Upload Only

I'm looking for a way to add image sizes that are only generated by uploads happening in the Theme Customizer, any suggestions or direction on how this could be done? I've already worked with the ...
1
vote
1answer
268 views

Process uploads with phpThumb before generating thumbnails

I was wondering if anyone knew a way (via function, plugin, or another method) of using phpThumb to process an image on upload, and then for Wordpress to generate it's usual image sizes from both the ...
1
vote
2answers
265 views

Is it a good practice to change media settings on theme activation?

I want to change default image sizes when user activates my theme so that the default medium image width is exactly the width of page content (for pages with sidebar) and the large image size fits ...
1
vote
1answer
105 views

add_image_size adds size, but doesn't upload if source resolution is same as resize resolution

I'm trying to add a new image size of 300x300.. This works, but if the uploaded file is for example 300x300, it doesn't upload the resized image.. You'd say that isn't a problem because the original ...
1
vote
0answers
96 views

add_image_size wont work after get_intermediate_image_sizes

I am using the function get_intermediate_image_sizes() to check if an image size already exists, and if not create it. However when I use add_image_size( 'test3', 150, 150, true ); after the ...
0
votes
1answer
140 views

Thumbnails generated by “add_image_size” are not removed when removing media

I've noticed that images which are generated by "add_image_size" wont be deleted whenever i delete the media item. So after removing all media items in the media manager i have a upload folder full of ...
0
votes
1answer
277 views

Get the size (size in Kb or MB) of an featured image?

I need to display some featured image info on post page. Among other info I need to display file size of image (featured image of post). I tried this function inside single.php. <?php function ...
0
votes
5answers
7k views

Woocommerce showing images blurry in description page

I am doing an E-commerce website using Woocommerce plugin. Most of the things working fine with little bit changes. But I am facing a problem regarding images. I have uploaded the image for featured ...
0
votes
1answer
89 views

Custom image size vs CSS sizing

I am developing a theme which will have 2 configuration options for the slideshow in the header; a full width version and a half width version. The theme is also responsive and so I am trying to ...
0
votes
2answers
309 views

Server B handling add_image_size() differently than Server A

I'm curious what dependencies add_image_size() has because I just copied a theme over to a new server and began adding thumbnails to custom post types only to find out that my request for ...
0
votes
1answer
39 views

How can I automatically resize up images to fit into all of my registered image sizes

I need Wordpress to create versions of each image in ALL of the registered image size, even if the registered image size is larger than the uploaded file. For example, if I have the following ...
0
votes
1answer
53 views

How To Pick Custom Size Of Uploaded Image In Theme Via the_post_thumbnail();?

I am designing a magazine style theme and I want different image sizes as to show on index.php page. Now for this, I am using <?php the_post_thumbnail( array(100, 100) );?> but it is picking ...
0
votes
1answer
43 views

Why can't I display attachment_image_src with Custom Size?

I'm trying to display an attachment with a custom size that I created with add_image_size called "custom-size-01" What the code returns is the word "Array" I've looked at the wordpress reference and ...
0
votes
1answer
593 views

images not showing despite using add_theme_support('post-thumbnails');

I've got a system for post images where I have a specific category's post thumbnail shown in the header, with a cropped version appearing in the blog #preview, and the full size image appearing in the ...
0
votes
2answers
107 views

Only make custom image size if uploaded via Thickbox and attached to certain page

I am trying to make it so that WP will create another size image for me, but only when the image is uploaded via the Thickbox, and only when it will be attached to a certain ID. Does anybody know how ...
0
votes
1answer
1k views

the_post_thumbnail('my_image_size') always outputs full image

I'm developing a custom theme that uses several custom image sizes defined in my functions.php like this: add_theme_support('post-thumbnails'); add_image_size('featured_thumb', 175, 120, true); I ...
0
votes
1answer
125 views

Custom image size mixes width and height in output

I want to use a couple of custom image sizes for a site that I'm developing. When I output the images I sometimes do not get the correct width size because it is mixed up with the height size. It ...
0
votes
1answer
738 views

Resizing thumbnails retrospectively

I have a Custom Post Type called species - fishkeeping species profiles. Each species profile can have as many media attachments as it needs, plus a separate featured image. I've dealt with this by ...
0
votes
1answer
140 views

A little confused as to what add image size actually does

I have a call to add_image_size like so: if ( function_exists( 'add_theme_support' ) ) { add_theme_support( 'post-thumbnails' ); } if ( function_exists( 'add_image_size' ) ) { ...
0
votes
1answer
465 views

post thumbnail: increase dimension if smaller than… Possible?

I need thumbnails of minimum width: 400px. I would like that if the user uploads an image that is, say, 380px wide, Wordpress creates a 400px-wide version. Is that possible?
0
votes
1answer
91 views

Best way to receive special images in posts

Okay, this is what I'm thinking about (and it's not a coding problem right now, but my fundamental thoughts): How to receive / input images in posts for special uses, let's say a customized portfolio ...
0
votes
2answers
367 views

How to extract image width from add_image_size?

How can I extract the width of an image as defined in add_image_size for use as a template variable? For example if my theme defines the size small as add_image_size( 'small', 195, 146, true ); 195 ...
0
votes
1answer
21 views

Specify automatically the height and weight of the images

I just did a GTmetrix test for my website to check how it's going, and I noticed that I have many images without height & width size specified. So I start thinking about a Wordpress function that ...
0
votes
1answer
65 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 ...
0
votes
1answer
296 views

Display featured image file size, extension, filename, type, orientation?

How to display some information of featured image in post. I need to display: 1. a. Image file size (in kb or MB) b. Image type (.jpg,.gif...), c. Bare image name, with and/or without image ...
0
votes
1answer
109 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
1answer
105 views

Is it possible to maintain image aspect ratio when scaling images?

I'm using a theme which displays a grid of images, but it only works with landscape images at the moment (with portrait images, people's heads are cut off). The theme uses custom featured image ...
0
votes
1answer
206 views

add image size still doesn't work even after regenerating thumbnails

I'm encountering this very frustrating problem where add_image_size() just doesn't seem to work at all (in fact, I've never seen it even work before). By not working, I mean not resizing / crop (if I ...
0
votes
2answers
683 views

wordpress add image size crop function not working in version 3.8

I am using twenty fourteen theme to make another theme most of the files are same including the functions.php file, but the problem I am having is , When I add image size ( with true crop, hard crop ...
0
votes
1answer
134 views

Update Attached Image Size after Import

So I just exported all the data from one version of site, and imported it into a new version of that site (using the WP Import / Export options). I selected the box to download all attachments as ...
0
votes
1answer
324 views

Custom caption output for custom image size

I've done a lot of searching and have found out how to customize the img_caption_shortcode oputput. What I can't seem to figure out how to do: Add a specific class to the caption's output if a ...
0
votes
1answer
678 views

image_size_names_choose filter doesn't show

I have created a new image size using the add_image_size(), and I want to have it listed in the media library image size when I insert it. So I have the following code: add_image_size( "grade-image", ...
0
votes
1answer
891 views

add_image_size and add_filter('image_size_names_choose', 'my_custom_image_sizes') not working with wordpress 3.5.2

I'm tearing my hair trying to get additional image sizes appear in the media section when i upload new pictures. It works on older versions of wordpress but i can't get it to work on v 3.5.2 Here's ...
0
votes
1answer
141 views

Custom image size doesn't work

I'm developing my own theme. I'm trying to remove the default WordPress image sizes medium, large and full. I also want my own image size, vividflow-full-width. I'm using this Sumtips tutorial. At ...
0
votes
2answers
661 views

Add_image_size not cropping

I want to make a crop on the images of my blog page that have more than 443px adjust it to 645x443 size, exactly. I used this code: add_theme_support ('post-thumbnails'); add_image_size ...
0
votes
2answers
520 views

How to get image name, mime type, width, height, file size from post custom field?

What I need is some function to echo file name of image used in post like "image-file-name.jpg", or just "image-file-name". Also it would be great to be able to have even more information about image ...
0
votes
1answer
276 views

Regenerate Thumbnails Plugin successfully updated my thumbnails but image src won't change to new image size?

I "successfully" regenerated my thumbnails using the Regenerate Thumbnails Plugin as I added a variety of new image sizes to my site; however, I'm having difficulty getting these new images sizes to ...
0
votes
2answers
399 views

How to update custom image sizes?

I've added multiple custom image sizes using the add_image_size function. The problem here is when I need to update the proportions of these sizes, the changed sized won't apply. My guess is that ...
0
votes
1answer
202 views

Add_image_size not generating correct size

I have 2 additional image sizes i've added to my theme and the for some reason when I use the Force Regenerate Thumbnails plugin, my images are created but the files sizes are not exact. Here is the ...
0
votes
1answer
431 views

Using add_image_size in functions.php to get original uploaded file

It is possible to use add_image_size in functions.php to get the original uploaded file size. Because when I uploaded the images to my posts I cropped them in order to have 1x1 ratio for all my image ...
0
votes
2answers
155 views

Create an instance of add_image_size

I'm looking for a method to create an instance of add_image_size(); To elaborate: I am using the file uploader in a plugin to insert a file reference by ID. That ID is then used to create touch icons ...
0
votes
3answers
6k views

Thumbnail Cropping with add_image_size?

I want my thumbnails on a particular page to be 300px × 100px, exactly. Currently, images shrink until they hit the 300 pixel or 100 pixel mark. How do I get the image to crop to exactly 300 ...
0
votes
1answer
547 views

changing the default picture size link url

when i'm inserting a single picture thumbnail from the gallery with a link to the original picture, it gives me this: <a ...
0
votes
2answers
352 views

custom image size not being fetched

I'm developing a theme for a customer in which i need several versions of the same image. In my functions.php file i've added all the image sizes i need. For instance: if ( function_exists( ...
0
votes
2answers
375 views

Need To Resize Images Exactly Without Losing Image Details

I am working on a Wordpress site that heavily uses image uploading and whatnot, I have defined the image sizes in my functions.php and I have hard crop mode turned on which ensures that my images are ...