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
1answer
149 views

A little confused as to what add image size actually does

I have a call to add_image_size like so: if ( function_exists( 'add_theme_support' ) ) { add_theme_support( 'post-thumbnails' ); } if ( function_exists( 'add_image_size' ) ) { ...
0
votes
1answer
597 views

post thumbnail: increase dimension if smaller than… Possible?

I need thumbnails of minimum width: 400px. I would like that if the user uploads an image that is, say, 380px wide, Wordpress creates a 400px-wide version. Is that possible?
0
votes
1answer
100 views

Best way to receive special images in posts

Okay, this is what I'm thinking about (and it's not a coding problem right now, but my fundamental thoughts): How to receive / input images in posts for special uses, let's say a customized portfolio ...
0
votes
2answers
514 views

How to extract image width from add_image_size?

How can I extract the width of an image as defined in add_image_size for use as a template variable? For example if my theme defines the size small as add_image_size( 'small', 195, 146, true ); 195 ...
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
2answers
219 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 ...
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
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
166 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
1answer
740 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
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() ) { ...
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
1k 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
1answer
315 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 ...
0
votes
1answer
601 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 ...
0
votes
1answer
2k 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 ...
0
votes
1answer
1k views

Add suffix to filename of uploaded images

I registered 3 custom image sizes (Double sized, for retina displays) with add_image_size: thumbnail@2x, medium@2x and large@2x. function retina_image_sizes() { $retina_sizes = array( '...
0
votes
1answer
280 views

Custom image size doesn't work

I'm developing my own theme. I'm trying to remove the default WordPress image sizes medium, large and full. I also want my own image size, vividflow-full-width. I'm using this Sumtips tutorial. At ...
0
votes
2answers
2k views

Add_image_size not cropping

I want to make a crop on the images of my blog page that have more than 443px adjust it to 645x443 size, exactly. I used this code: add_theme_support ('post-thumbnails'); add_image_size ('blog-page',...
0
votes
2answers
829 views

How to get image name, mime type, width, height, file size from post custom field?

What I need is some function to echo file name of image used in post like "image-file-name.jpg", or just "image-file-name". Also it would be great to be able to have even more information about image ...
0
votes
1answer
436 views

Regenerate Thumbnails Plugin successfully updated my thumbnails but image src won't change to new image size?

I "successfully" regenerated my thumbnails using the Regenerate Thumbnails Plugin as I added a variety of new image sizes to my site; however, I'm having difficulty getting these new images sizes to ...
0
votes
2answers
742 views

How to update custom image sizes?

I've added multiple custom image sizes using the add_image_size function. The problem here is when I need to update the proportions of these sizes, the changed sized won't apply. My guess is that ...
0
votes
1answer
333 views

Add_image_size not generating correct size

I have 2 additional image sizes i've added to my theme and the for some reason when I use the Force Regenerate Thumbnails plugin, my images are created but the files sizes are not exact. Here is the ...
0
votes
1answer
523 views

Using add_image_size in functions.php to get original uploaded file

It is possible to use add_image_size in functions.php to get the original uploaded file size. Because when I uploaded the images to my posts I cropped them in order to have 1x1 ratio for all my image ...
0
votes
2answers
166 views

Create an instance of add_image_size

I'm looking for a method to create an instance of add_image_size(); To elaborate: I am using the file uploader in a plugin to insert a file reference by ID. That ID is then used to create touch icons ...
0
votes
3answers
9k views

Thumbnail Cropping with add_image_size?

I want my thumbnails on a particular page to be 300px × 100px, exactly. Currently, images shrink until they hit the 300 pixel or 100 pixel mark. How do I get the image to crop to exactly 300 &...
0
votes
1answer
790 views

changing the default picture size link url

when i'm inserting a single picture thumbnail from the gallery with a link to the original picture, it gives me this: <a href="http://www.dayadamy.org/wp-content/uploads/2011/12/PC220001.jpg">&...
0
votes
2answers
608 views

custom image size not being fetched

I'm developing a theme for a customer in which i need several versions of the same image. In my functions.php file i've added all the image sizes i need. For instance: if ( function_exists( '...
0
votes
1answer
415 views

Need To Resize Images Exactly Without Losing Image Details

I am working on a Wordpress site that heavily uses image uploading and whatnot, I have defined the image sizes in my functions.php and I have hard crop mode turned on which ensures that my images are ...
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
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
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' ); ...
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
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
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
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 ...
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 (...
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
150 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( '...
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
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
1answer
112 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
120 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 ...