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

Customising the size of images served in Visual Composer elements

I'm using the Visual Composer plugin to build, or basically visually insert the shortcode for a number of sliders, latest blog posts and masonry grids. Most of these are set to use a posts featured ...
0
votes
2answers
20 views

How can I get I get the thumbnail custom size dimensions?

Assuming I have a custom thumbnail size, as defined by the following... add_image_size( $name, $dim_x, $dim_y, true ); ...how can I get the defined image dimensions programatically, using only ...
0
votes
0answers
19 views

Essential Grid- ignoring Set Image Source Type

I am setting this value for the 'Set Image Source Type' And I have this in my functions: add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 370, 277 ); add_image_size( 'mnd-size', ...
0
votes
0answers
8 views

Compress full-size image into a separate custom size

I need to have a custom image size (or else) with the same resolution as the original uploaded image, with a jpeg quality of 60. The reason behind this is because the images must be shown sometimes in ...
0
votes
0answers
18 views

How to setup a new image size in a child theme?

I need to setup a new size for a thumbnail that will be used by a plugin but I can't get this done, this is what I have so far: /** * Registers a new image size. This means WordPress will create a * ...
0
votes
1answer
23 views

How risize a thumbnail?

I have a wordpress thumbnail, but i when set the size this (500,200) wordpress resize the imagen and let it square, only 500x500. I set in functions.php add_image_size ('single_post',500,200) In ...
0
votes
0answers
12 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
19 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
39 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
36 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
47 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
41 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
52 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
47 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
40 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
48 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
36 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
19 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
54 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
65 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
98 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
68 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
143 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
122 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
223 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
164 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
109 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
249 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
88 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
54 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
52 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
841 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
237 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
272 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
948 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
77 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
99 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
121 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
71 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
136 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
1answer
75 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 ...
-2
votes
1answer
128 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
750 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
508 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
48 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
210 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
784 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
418 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
89 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
158 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( ...