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
10 views

add_image_size functions Not working on server

I'm using a function to create custom image sizes: add_action( 'after_setup_theme', 'bbt_images_sizes' ); function bbt_images_sizes() { add_image_size('420x500',420,500,true); // portfolio-slider ...
3
votes
1answer
127 views

add_image_sizes ignoring crop sizes and using proportion

Before we start, the image is definitely big enough. I have an image that is 2206 x 2042 and I wish to crop (not scale) it in a number of different ways to be used responsively. The sizes I am ...
1
vote
1answer
23 views

Using Add_image_size when adding image in post

I have put add_image_size('image_horizontal', 750, 300, false); in functions.php file but it doesn't appear as selection when publishing new post and adding image in the post, all I see is thumbnail, ...
1
vote
0answers
49 views

Wordpress not cropping thumbnails properly

For some reason Wordpress is ignoring my thumbnail sizes and keeping thumbnails cropped proportionately instead of specific dimensions. Here is what I have in my functions.php: add_image_size('main-...
0
votes
0answers
23 views

How to remove responsive attributes on some images?

I have added a hook to my functions.php to adjust the srcset and sizes attributes of the featured images of my site, but now it also applies to thumbnail images that I don't want to be modified. So ...
0
votes
2answers
32 views

How to insert a local image with custom size

I am not very familiar with PHP yet but I am trying to build a Wordpress theme. In one of my theme files I simply want to insert an image (located at the theme directory /img/image.jpg) with a link ...
1
vote
0answers
29 views

Responsive Images - crop don't seem to work

most likely I didn't got the idea of responsive images right know, so please consider pointing out misunderstandings in that concept. What I want to have: I have a page where I query for custom ...
0
votes
1answer
35 views

One of my image sizes isn't showing up in srcset

So for I've added some custom image sizes like this: add_action('after_setup_theme', 'image_sizes_setup'); function image_sizes_setup(){ add_theme_support( 'post-thumbnails' ); ...
1
vote
1answer
16 views

Modifying protexted image sizes: use “add_image_size()” or “update_option()”?

I'm finding conflicting info on whether it's okay to override protected WordPress image sizes (thumbnail, medium, medium_large, and large) with add_image_size(). Some docs indicate it's better to do ...
0
votes
1answer
32 views

Image Sizes/Thumbnails not generating on local install Ampps

I'm not sure what is going on. I can't get the thumbnails to generate. I tried the "force regenerate thumbnails" plugin, but that didn't work. I' don't have any plugins running and I've tried with a ...
0
votes
2answers
19 views

How to Generate Custom Image Size in Uploads Folder?

I have an image site which based on Wordpress. There are different resolutions below the picture in single post. For example: 1024*768 - 1200*900 - 800*600 When I click on one of these resolutions ...
0
votes
2answers
149 views

Keep image EXIF info after compressing original image?

After testing I realized that Word Press after image upload will make medium and thumbnail sized images of original image without EXIF/IPTC info I realized it is because GD image library is used on ...
0
votes
1answer
34 views

Why does the Hard Crop option Scale?

I have a number of custom image sizes. I noticed earlier, when I was publishing a new post, that the post image was cropped AND scaled. It is exactly the right dimensions.. but it isn't the portion of ...
0
votes
1answer
14 views

add_image_size cropping changes on Mobile devices

I have images that are being cropped by wordpress with add_image_size( 'centerright', 320, 320, array( 'right', 'center' ) ); But on mobile, it seems showing those same thumbnails but the default ...
0
votes
1answer
32 views

Image Crop Not Working

I am building a custom WordPress theme. I am using Advanced Custom Fields to have an area for the user to upload custom images. This is what I have in my functions.php file. My images aren't taking ...
2
votes
0answers
54 views

Upload an image and replace it with a custom image size [duplicate]

My aim is to upload an image and completely replace the original source image with a custom image size, as if the custom image sized file was the uploaded image. For example, I have custom image size ...
0
votes
1answer
43 views

Specific image size is being generated without being registered

I am looking at uploads folder and I see that 768x510 images are being generated. I am using my own theme and I don't have that size registered, there isnt anything registered in media options in ...
0
votes
2answers
33 views

Resize existing library images

How can I resize images that were already in the Media Library when I created new custom image sizes? I just want WP to process them as if they're new images, taking into account my new settings, ...
4
votes
1answer
183 views

WP 4.4. responsive loads normal image after loading the responsive image

I have the 2 new added sized that I am testing: // testing add_image_size('new-small', 500, false); add_image_size('medium-large', 768, false); // just added today for devices support image ...
0
votes
2answers
247 views

add_image_size not working with the_post_thumbnail

Code in my funcitons.php function custom_thumbs() { add_image_size( 'cover-size', 1600, 450, true ); } add_action( 'after_setup_theme', 'custom_thumbs' ); Usage: echo the_post_thumbnail($post-...
5
votes
1answer
107 views

Add image size where largest possible proportional size is generated

I'd like to add an image size where the resulting image will be the largest possible size while retaining a 4:3 aspect ratio. Suppose I've added an image size like so: add_image_size( 'cover-image', ...
4
votes
1answer
233 views

WP 4.4 aspect ratio with responsive image

How to make new WP responsive image to choose images by filename and add them to srcset without checking aspect ratio? I have my own sizes: add_image_size( 'l', 992, 500, array( 'center', 'center' ) ...
0
votes
1answer
131 views

Dynamically determine the width and height of a image file to be cropped & uploaded AFTER form submission given fixed aspect ratio

I know that I can use the add_image_size() function in the function.php of the theme to pre-determine the additional desired image file of specific width & height to be cropped and uploaded. ...
0
votes
1answer
19 views

Wordpress not using edited image

I have uploaded a picture to media library and cropped the image in wordpress editor but when selecting the edited image http://mariehelenesund.se/wp-content/uploads/2015/11/Kicki-e1447542665309.jpg (...
1
vote
1answer
43 views

Is there a way to change wordpress image resize settings?

Websites nowadays tend to have big banners and big images. Thus when developing sites we try to optimize these images as much as possible. However, when wordpress resizes these images, it does a ...
0
votes
0answers
25 views

Overwrite a theme's add_image_size from my custom plugin?

I have develop a little plugin which also uploads images in a specific folder. But i notice one image got saved 3 more times, all other image size. I found the theme is using add_image_size. So how ...
0
votes
2answers
221 views

Resize image to specific dimension (X to Y ratio)

I've tried to add my custom image size like: add_image_size('224_226', 224, 226, false); I need resize all images to same size what i define in style, when i've uploaded file - Wordpress resize it ...
-1
votes
1answer
88 views

Set add_image_size() greater then content width in media box

How can I set a image size bigger then the defined max content width in the media box? The content width is set to: if ( ! isset( $content_width ) ) { $content_width = 960; } If I add now a ...
0
votes
2answers
154 views

Adding custom image size to the media image editor

I'm trying to give a more complete experience to my WordPress backend users and let them edit the custom image sizes I have added to my theme. I added this to my functions.php: add_image_size( '...
1
vote
0answers
484 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 ...
1
vote
2answers
88 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
123 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
23 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
29 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
28 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
38 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
2answers
83 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
57 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
113 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
62 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
122 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
70 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') ); ...
1
vote
1answer
67 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
1answer
123 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
49 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
2answers
125 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
104 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
211 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
127 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
1answer
289 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 ...