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
8 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 ...
0
votes
2answers
422 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
2answers
2k 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
1answer
938 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
1answer
531 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() ) { ...
3
votes
1answer
126 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
48 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
31 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 ...
0
votes
1answer
573 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 ...
10
votes
10answers
8k views

How to generate thumbnails when needed only?

I have 1000 images. How can i make wordpress to generate thumb only when needed. For example home slider will only use 10 images i dont want the other 1000 images have that thumbnail generated as its ...
0
votes
2answers
2k 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
151 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( '...
16
votes
5answers
9k views

How can I make add_image_size() crop from the top?

I have a series of posts, all with featured images, but I need to be able to customise the crop top right corner. In this instance, I need them to be cropped from top right, but it would be useful to ...
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
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( '...
0
votes
2answers
146 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
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
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 ...
-1
votes
1answer
87 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
1answer
30 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
2answers
3k 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 ...
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
42 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 ...
1
vote
1answer
66 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 "...
4
votes
1answer
181 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
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, ...
0
votes
2answers
245 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
127 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 (...
5
votes
2answers
1k views

How to resize images in wordpress without adding any compression or changing the color profile of the images, possible?

As you can guess from the title, Im looking for a solution that allows me to alter the way Wordpress processes/saves its newly created images according to the media settings in the dashboard. This is ...
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
220 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
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 ...
11
votes
2answers
5k views

Set default image sizes in WordPress to hard crop

How do I set the medium and large images sizes in WP to hard crop? In my theme I can set the thumbnail size to hard crop using this: add_theme_support('post-thumbnails'); set_post_thumbnail_size( 96,...
1
vote
0answers
483 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
87 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 $...
7
votes
2answers
2k views

Remove images (files) that were generated when using add_image_size()

I have added an image size using this: add_image_size('property-featured', 484, 393, true); It's worked very well for the past year and has generated about 1GB of images in that size, but this ...
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 ...
9
votes
2answers
10k views

How to scale up featured post thumbnail?

The situation is this: I'm using Video Thumbnails plugin to automatically get and set youtube/vimeo thumbnails as post featured image. The problem is that default youtube/vimeo thumbnail sizes are ...
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 * ...