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

0
votes
0answers
7 views

Attachment image url with size extension?

I want optimised images as I'm using them as background images. My element is 300px by 300px. I'm using the post's featured image. I've noticed when using get_the_post_thumbnail() with a specified ...
0
votes
0answers
13 views

After Image is Uploaded Set Custom Thumb size

This is the function for making a custom thumb size. BUT this needs to be executed after the image is uploaded. How do i do that? What is the "image path" after i upload the image? Thank you. ...
0
votes
2answers
29 views

Overwrite add_image_size defined by theme

I bought a WP-Theme which defines a custom image-size in his theme-functions.php like this: if ( function_exists( 'add_image_size' ) ){ add_image_size( 'tie-small', 70, 70, true ); } As you can ...
0
votes
1answer
31 views

Why isn't add_image_size('event-secondary-image-thumbnail', 250, 150) working?

I am using a plugin called multi post thumbnails so that I can have more than one featured images for each post. I have a custom post type called event. The class multiPostThumbnails exists . it ...
0
votes
1answer
30 views

Update add_image_size

This has been asked before, but the answer is from three years ago and is not working for me, so I'm wondering if something fundamental has changed since then, or if I'm fundamentally misunderstanding ...
0
votes
1answer
29 views

Get custom size of thumbnails

This how I am currently retrieving slides: <?php $args = array( 'ignore_sticky_posts' => 1, 'posts_per_page' => 20, 'post_type' => 'slide' ); $slides = ...
0
votes
1answer
36 views

variable crop option with add_image_size()

In my child Theme I have set my custom image with add_image_size( 'big', 1500, 1000 ) I left out the crop parameter, but it is [false by default][1] anyway. I want to make this a variable option. I ...
1
vote
0answers
41 views

Thumbnails of same size with different crop

Is there any way to generate thumbnails of the same dimensions, but with a different crop? I want to do something like: add_image_size( 'thumbnail_top', 360 , 180 , array ('center', 'top') ); ...
0
votes
1answer
30 views

Wordpress returns old thumbnail size after changing media settings

I have had a requirement to update a WP build so that the thumbnail size changes from (the default) 150x150 to 500x500. I've amended the size within the Settings > Media and utilised the awesome ...
0
votes
0answers
37 views

wp_get_attachment_image_src() regenerate custom size images everytime

i try to make simple gallery from post's attachment images with custom sizes. i wrote simple loop: $original = array(); $gallery = array(); $gallery_min = array(); $imgs_args = array( ...
1
vote
2answers
34 views

Generate image for newly added size

I have added a new image size to a wordpress site with lots of images already present with all their thumbnails. Is there a way to do this: given the post using a specific image, get the attachment ...
0
votes
0answers
18 views

How to pick up featured image from set of pictures

I'm trying to create front end form for posting. The following questions are concerning me so bad. How can I set a featured image? I tried set_post_thumbnail($pid, $newuploadid); but nothing happend. ...
0
votes
2answers
46 views

Use existing image sizes for WooCommerce

I've built a theme and have set the following image dimensions via functions.php: set_post_thumbnail_size( 1064, 347, true ); // Upload @ 2128(W) x 708(H) add_image_size( 'standard', 352, 235, true ...
0
votes
1answer
51 views

Adding secondary featured image for page_for_posts

@Howdy_McGee helped me sort out adding a banner image to page_for_posts, however I need to resize images showing up in the blogroll for page_for_posts so it doesn't use the featured image banner ...
1
vote
1answer
78 views

Overwriting Parent Theme's Image Sizes

I'm using Raw by UDTHEMES as a parent theme for a site I am working on. In the parent theme, there is the following image size: add_image_size( 'udt-full-width-image', 870, 490, true ); And I am ...
0
votes
2answers
55 views

Access the resized images generated by `add_image_size()`

I have set up some shortcodes to make things simpler for the user. It wraps up some bootstrap markup and just lets you put the h1, some img urls, etc in it without getting too close to the markup. ...
1
vote
0answers
121 views

Crop image to horizontal or vertical by code based on image size

my client asked me to create gallery(WP gallery) based on this site. the problem here is that i need to crop images based on image size before inserting the image in the Media library. now i using ...
0
votes
0answers
104 views

Conditionally Use image_resize_dimensions()

I used add_image_size() and image_resize_dimensions() to upscale and crop images in WordPress. It is working as expected except on the Edit Media page. Generally on this page you would see your full ...
0
votes
0answers
180 views

Set image dimension for WP_Customize_Image_Control images

In the customize page for the current theme the Current Header's Choose Image dialog shows - a "select and crop" option But the custom WP_Customize_Image_Control shows only "Choose Image". Is ...
0
votes
2answers
115 views

Use Exact Image Size using add_image_size

I have a pretty basic question. It may be very noob question, but it is bothering me a lot. In my theme I've added a custom image size like this: function img_update() { if ( function_exists( ...
0
votes
1answer
82 views

Custom image size in Media Dropdown

I've tried everything you have said, but it's not working on my site. I'm using the below function: function setup_image_sizes() { if ( function_exists( 'add_image_size' ) ) { ...
1
vote
0answers
175 views

Overwrite Parent Theme add_image_size in Child Theme

I'm using a child theme of a parent theme. Now on my parent theme, theveloper adds some custom image sizes like this - if ( function_exists( 'add_image_size' ) ) { add_image_size( ...
0
votes
1answer
71 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
0answers
42 views

Show custom image size smaller in editor

I have a custom image size which editors should be able to use in their posts. I already managed for the custom size to show up in the add image dialogue, so that part is fine. On the destop version ...
0
votes
0answers
41 views

Retina upload image function

I use this: add_image_size('featured', 500, 100, true); to get an extra image size available in the theme. When I use the retina upload script below, it works fine most of the time. But if I upload ...
0
votes
1answer
692 views

custom thumbnail image size not working

I added below code in theme's function.php add_theme_support( 'post-thumbnails' ); add_image_size( 'thumb-small', 200, 150, true ); and <?php the_post_thumbnail('thumb-small'); ?> ...
0
votes
1answer
139 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 ...
2
votes
1answer
216 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 ...
0
votes
1answer
712 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
71 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
0answers
90 views

Portrait or Landscape images are not cropped to exact dimensions

I'm using a theme that's registered a new image size of 580x580 that's then resized to 100% width to fit in a column (approx 200px wide) The problem is that an image that is originally 225x600 gets ...
0
votes
2answers
100 views

Trouble Retrieving Thumbnail URL on Front-Page

I'm running multiple queries on a front-page.php file. They all seem to be working fine, except that I am having a hard time getting a thumbnail image. The code in question, on my front-page, ...
2
votes
1answer
67 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
105 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
25 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
66 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
18 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
110 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
656 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
472 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
43 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
194 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
581 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 ...
2
votes
1answer
355 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
83 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
153 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
291 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
727 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
832 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
464 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 ...