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

2
votes
1answer
24 views

Custom image sizes only for thumbnails

I solve one problem, I use in template several different sizes of images (add_image_size), but I use them only for thumbnails, it is completely unnecessary to create these sizes for each image ...
0
votes
2answers
33 views

add_image_size() width not actually working

I've been attempting to add an image size to my code, for an image that needs to be 708px wide. Height can be variable. I've added the code this way: add_image_size( 'full-blog-width', 708 ); ...
0
votes
0answers
15 views

Generate images according to proportion of original image

I'm looking into if it's possible to generate images with different sizes depending on the proportions of the original image. For example. If the uploaded image has a proportion 4:3 it should ...
0
votes
1answer
26 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
0answers
17 views

Remove Parent Image Size and Create Different Size [duplicate]

I am trying to generate a different image size of a parent themes functions.php within a child themes functions.php. Here is the code of the parents functions.php // Parent Theme functions.php Code ...
-2
votes
1answer
51 views

How to show file size of featured image? [duplicate]

How to show file size of featured image in post on single.php? For example: File size of featured image is: xx kb/Mb I need size of featured "full" rezolution, also file size of "medium" resolution ...
0
votes
1answer
147 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
1answer
137 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
21 views

get_intermediate_image_sizes() returning different values depending on is_admin()

I have checked the code of the "Simple Image Sizes" plugin and found out how "they" read the available thumbnail/image sizes. However when I use the get_intermediate_image_sizes() function in a ...
0
votes
1answer
55 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
37 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
0answers
16 views

Images sizes generated smaller than specified

So I have an image that's 1536x2048 and I've set up an image size that would hard crop to 460x600 with: add_image_size( 'hard-edge', 460, 600, true ); When this is actually output, I get a file ...
1
vote
1answer
62 views

Wrong image dimensions in Insert Media after add_image_size()

I am creating a custom Wordpress theme based on the Bones WP theme. I'm having a problem where an image size that I've specified in functions.php using add_image_size() isn't showing the correct width ...
3
votes
1answer
53 views

Confused about image sizing business in Wordpress

I'm creating my first Wordpress theme and I've got everything working fine, and by following this tutorial and few others I've understood how to add custom image sizes by using add_image_size() ...
1
vote
1answer
91 views

Confusion about arguments sent to add_image_size

Looking at the documentation for Cropping Thumbnails when adding new image-sizes makes me confused. Set the image size by cropping the image and defining a crop position: add_image_size( ...
0
votes
1answer
103 views

Trying to set specific image dimensions and crop with ACF

My question is about image sizing. I get how to the sizing/cropping stuff natively in WP add_image_size( 'thumb-crazy', 500,500, true); And then in the template type: if ( has_post_thumbnail() ) { ...
0
votes
1answer
75 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 ...
1
vote
3answers
221 views

Define size for `get_post_gallery_images`, they seem to have been resized to 150x150

I'm using get_post_gallery_images and it's spitting images out as 150x150. It doesn't look like it takes a size parameter, so I assumed it would just spit out the largest image or preferably one of my ...
0
votes
1answer
116 views

How to get cropped thumbnail source for custom post type

I need thumbnail image url with size 148*148px. I using custom post type for testimonials. I need just the image source like http://example.com/demoimage.jpg. It is possible to get cropped image ...
0
votes
0answers
26 views

Defined image size not being used when dynamically loading images

I'm using an add_image_size(); of 70x70, in a custom theme. During an ajax request I load a template_part(); with the defined image size, locally all of these images load fine and at the correct ...
7
votes
4answers
353 views

Add image size if page template

I'm building a members website with WordPress Multisite. Is it possible to restrict how many images are being generated depending on the selected template? I have tried the following lines of code ...
0
votes
1answer
65 views

Getting custom size image URL

I added custom image size like below. add_image_size( 'team-member', 220, 220, true ); I can get this image like below in the post. the_post_thumbnail( 'team-member' ); But how can I get image ...
1
vote
1answer
44 views

Large image size stuck on old value, even for new images

I changed the 'Large' image size in Settings > Media > Image Sizes from the default to max-width 586px. That was wrong, so I changed it back to max-width 1024px. However, the smaller size seems to ...
0
votes
0answers
7 views

How can i resize/force every uploaded post image width to be 460 [duplicate]

How do I resize every uploaded post image to be always 460 width by whatever corresponding height?
1
vote
1answer
110 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 . ...
0
votes
0answers
88 views

Wordpress plugin page database connection not working

I am working on wordpress plugin that has option to upload multiple images from wordpress backend and i a using this http://hayageek.com/examples/jquery/jquery-multiple-file-upload/index.php jquery ...
0
votes
1answer
79 views

How can i specify the size of the image rendered by the_content();?

I can do it manually like this: echo get_the_post_thumbnail($post->ID, 'large'); But how can i set the size of the image rendered by the_content(); to Large too ?
1
vote
0answers
31 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 ...
0
votes
2answers
491 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
3answers
248 views

Media Library Image Sizes in Bones theme (add_image_size)

I'd like to create new thumbnail options in Bones and have followed the instructions in the Bones theme Functions.php file. I am expecting therefore that one should be able to choose from the Size ...
0
votes
2answers
43 views

Check if custom thumnail size image has been cropped to the correct dimensions

I'm looking for a way to check if an image has properly created a custom thumbnail size that has been hard cropped. add_image_size( 'homepage-thumb', 1676, 828, true ); $size = "homepage-thumb"; ...
1
vote
1answer
160 views

Wordpress Image Editor doesn't update thumbs specified with `add_image_size()`

The title somewhat explains the issue. I have a template using bones. I am not sure if this matters or not. http://themble.com/bones/ In the functions.php file we add some additional thumbnail size ...
0
votes
0answers
16 views

Resize photo on wordpress [duplicate]

Based on Function add_image_resize in wordpress http://codex.wordpress.org/Function_Reference/add_image_size if i have rule in functions.php like this add_image_size('featured-slider', 940, ...
0
votes
1answer
69 views

cant output grayscaled ive created using add_image_size

I am trying to create a gray scaled image of the image i upload. I have been able to upload the image and create the gray scaled version by using this code: ...
0
votes
1answer
113 views

Only create image size when used in featured image

I'm using a post thumbnail size and I was wondering if there is a way to setup so wordpress only make the thumbnail size when the image I upload is used as the featured image rather than for every ...
0
votes
1answer
29 views

Custom image sizes

I noticed lots of articles on how to add custom sizes for images (media). But how would I be able to add a custom size such as "width:100% and height:auto" this way it will make sure the images are ...
0
votes
0answers
22 views

Custom thumbnail size for each post format [duplicate]

I want to customize each post format his thumbnail without creating many size in all posts, for example: Instead of : add_image_size( "standard-format", $width, $height, true ); add_image_size( ...
0
votes
1answer
96 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 ...
2
votes
2answers
135 views

Use image url with add_image_size

I am looking for a way to use an image url with the WordPress function add_image_size, I have already setup an image size called 'custom-thumb' For example, instead of... the_post_thumbnail( ...
1
vote
1answer
156 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 ...
0
votes
1answer
46 views

Always generate thumbnail after sideloading image

I'm sideloading an image into wordpress from youtube. it works fine and the key part of the code is: // sideload it into wordpress (generates various sizes) $thumbid = media_handle_sideload( ...
0
votes
1answer
273 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 ...
-1
votes
1answer
663 views

wp_get_attachment_url with specific image_size?

I'm using Woocommerce for a 1800+ product e-shop. Woocommerce comes with a built-in PrettyPhoto lightbox plugin. By default it loads the original Wordpress image size when you click to zoom the image ...
1
vote
0answers
66 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 ...
0
votes
1answer
529 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
31 views

Guaranteed Image Sizes

I am using the following line of code to create a new image size: add_image_size('single-post-image', 600, 370, true); However, this line of code does not guarantee that, the image will be of ...
1
vote
0answers
115 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
votes
1answer
114 views

How to modify Media Library images DPI [ image quality down to make small in size ] [closed]

I wonder if there any code or hook out there to manage the image DPI, for example when we use photoshop or other image editing software we use export and image quality to 0-100%, now i am looking for ...
1
vote
1answer
561 views

How to get custom image sizes into media uploader dropdown?

I searched net to solve the problem with images size uploaded from media. But not even one worked to me. When I try to insert images from the media into post it does not show my custom image size 608 ...
0
votes
1answer
765 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 ...