Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [image-size]

WordPress has four built-in image sizes. Uploaded images will automatically be scaled to all these sizes. It is possible to remove these defaults and to add custom image sizes.

0
votes
0answers
10 views

Soft proportional crop short side

Is it possible to soft crop an image with custom-size along the short side of the image? Right now my images are used as background of a div with background-size: cover; after they are soft-cropped ...
0
votes
1answer
16 views

How use custom image size + ACF + background image

How to get the URL from an image with custom image size to use as a background-image from AFC? Register size in functions.php: add_theme_support( 'post-thumbnails' ); add_image_size( 'homepage-thumb'...
0
votes
1answer
36 views

File upload size limit in wordpress and php.ini limit

I am developing a wordpress site, I have hosted my wordpress site on Infinityfree.com as of now. I am trying to upload a plugin which is 18MB and landing with this error "The uploaded file ...
0
votes
0answers
21 views

Woocommerce shows product images in the wrong size

All products in my website have 200x200 featured images. But in catalog images are shown in 750x750 (sooo blurry) instead of 200x200. Source code of catalog page: <img width="200" height="200" src=...
0
votes
0answers
18 views

Missing image size

I have added a couple of custom sizes to my wordpress environment with the following code: add_image_size( "maximal", "1900" ); add_image_size( "desktop", "1400" ); add_image_size( "tablet", "900" ); ...
3
votes
0answers
104 views

Edit srcset and sizes attributes in Gutenberg image, cover and gallery - blocks

I am looking for a way to adress the responsive srcset and sizes attributes on Gutenberg image blocks - like image, cover and gallery. Usually one would do this with the '...
1
vote
1answer
19 views

IMG src weird behaviour inside a single post loop

I was trying to sort out the final look the featured image of a single post, so for the purpose wanted to add a class to the img tag. However on the way, I run into some weird behaviour while trying ...
1
vote
0answers
84 views

wordpress responsive image srcset not working

I'm trying use wordpress core responsive image feature but it's not adding srcset to image. Here is th my codes I have a div w=370px h=280px now I added image sizes if(function_exists('...
0
votes
0answers
40 views

Customize Sizes Attribute for Default Image Sizes (Medium, Large)

I'm trying to modify the default 'sizes' attribute for images placed in content using the default WP sizes (e.g., Medium or Large). These are images generally placed in the body of a page/post with ...
0
votes
0answers
19 views

Image size in browser is defaulting to fill the container despite editor / styling settings

I am in the process of building my first theme. I have built everything up slowly and have a very simple setup. Now I am stuck on something that is probably a very easy fix. Problem: When I add an ...
0
votes
0answers
10 views

Can I edit mogrify command arguments in WordPress if it uses ImageMagick during upload of images?

Reading through https://www.smashingmagazine.com/2015/06/efficient-image-resizing-with-imagemagick/ and https://wordpress.org/plugins/ricg-responsive-images/ from my understanding, it seems that ...
0
votes
0answers
139 views

Delete images for unused media image sizes, without regenerating other thumbnails

I have set 5 custom image sizes in my theme. On top of the 3 default image sizes, I have around 10 other unused image sizes from a plugin that I'm not using anymore. I want to delete the images for ...
0
votes
0answers
14 views

Change Image Height of Blog Post

When I edit the image height of the main header, the header of the blog post is still the standard size. So the Post header is smaller than front page. I want to edit the height of the blog post ...
0
votes
0answers
13 views

Stripes in a top Banner

While playing with different resolutions I found that I get stripes on the top banner of the website (wordpress). I looked at the CSS and it is pretty straight forward: .banner-top {position: ...
0
votes
0answers
55 views

Add @2x to all images by default

I disabled the default srcset attribute WP is adding to all images because it's bloating my code too much and I don't need it really. However, I do upload the retina version each time I upload an ...
2
votes
1answer
77 views

Force all images to full size in page template

I have a page template that outputs all posts with minimal formatting - no headers, footers, sidebars, etc. With the loop, the_content() is used to output content (text and images). I need to ...
0
votes
1answer
59 views

Get a specific size from wp_get_attachment_image_src

I have this section in my website where i use wp_get_attachment_image_src() to get all the images associated with the post, but now you want to get a certain size (size: listing_grid): <?php $...
0
votes
0answers
13 views

Images zoomed in on Related Post section

I am using 'The 7' wordpress template and the Related Post section, included with the template, sometimes show zoomed in images. It seems that happens when I scroll down the page very quick right ...
0
votes
0answers
73 views

Get srcset and size atribute from Rest API

Is there a way to get the srcset and sizes atribute for a feature image from the posts endpoint in the WP REST API? Or do I need to generate them with JS from _embedded['wp:featuredmedia'][0]....
0
votes
0answers
26 views

Specifying image size used in template the_content

I have a template that is used to display all posts. It uses query_posts with a set of $args that I specify. The template uses the_content to output the content of each post (text and images) I want ...
1
vote
0answers
173 views

ACF Wysiwyg Editor Image srcset for responsive images [closed]

I cannot find a way to generate srcset for images added inside Wysiwyg Editor field of Advanced Custom Field (ACF) plugin. Obviously, i know how to generate WordPress image srcset using: ...
0
votes
2answers
46 views

Post thumbnail not displaying correct size

I created a custom template. It contains 3 columns, and the middle column should only display the post thumbnail. But no matter what size attribute I'm setting, it's not changing the size the way I ...
2
votes
1answer
118 views

Unexpected width and srcset attributes for the_post_thumbnail();

I am modifying a theme, using a child theme, and in a template file (single.php) I need to display a large post thumbnail, so I have this code: the_post_thumbnail('large'); In Settings > Media, the ...
0
votes
1answer
19 views

How to add the option to choose between sizes for featured image within post editor?

Drew a blank Googling for this... Our website homepage shows a grid of featured image thumbnails on the home page. Some of these images are portrait and some are landscape. I would like to be able ...
0
votes
0answers
21 views

just one image-size upload with wp-uploader

I made my theme. And in my theme, there is 4 image-sizes setting in my functions.php like bellow. add_image_size( 'small_img', 200, 120, true ); add_image_size( 'large_img', 500, 20, true ); ...
0
votes
1answer
30 views

How to compress thumbnails instead of cropping

I have a console script which imports woocommerce products and creates images and its thumbnails for products. The problem is that thumbnails are cropped. And I need to compress all generated ...
0
votes
0answers
51 views

Custom Post Type Images showing wrong size

I have created a custom post type called doctors. I added new doctor and added a photo and set size to thumbnail or medium. In the front page the size is large. If i do the same thing in page type, ...
0
votes
0answers
803 views

Generate new image sizes instead of serving scaled images

So https://gtmetrix.com/ will show me images on my Wordpress website that are a large resolution and are being resized via CSS, eg: XYZ.jpg is resized in HTML or CSS from 4207x3665 to 263x229. ...
3
votes
0answers
70 views

Using srcsets to load different images based on browser widths

I want it so that on a mobile breakpoint, the image in my function uses 'full' and on laptop/desktop it uses 'thumbnail'. Here's a snippet of what I've got going on: while ($sponsors->have_posts()...
2
votes
1answer
551 views

How to get CMB2 to show a single image at a specific size

Trying to get the CMB2 plugin to display an image at the WP default medium size on the page. I can get it to display an image but that image could be any size the user wants I'd rather it was cropped ...
1
vote
0answers
22 views

Control Responsive Images

I noticed on my site that the images I'm using are presented in html as having variants, this is causing some images to look terrible on smaller screen mobile phones. I extracted the html: https://...
0
votes
1answer
36 views

Custom image sizes quality

Images uploaded on my WordPress website are too heavily compressed. I found out that WordPress automatically compresses images and you can change that with a filter: add_filter( 'jpeg_quality', ...
1
vote
1answer
920 views

How to change Thumbnail size of next Gen Gallery plugin?

I recently installed nextgen gallery plugin . and I show my gallery with BASIC COMPACT ALBUM, but image thumb size is too small. and I want set thumbnail 300x240. I set image size with CSS but images ...
0
votes
0answers
26 views

add_image_size via An input by user

I have a code here which is to add an image size via user input: add_action( 'after_setup_theme', 'add_size_for_featuredimage' ); function add_size_for_featuredimage() { $width_ft = esc_attr(SIO_FTP::...
2
votes
1answer
55 views

Passing srcset to image attachment method

I would like to pass values of wp_get_attachment_image_srcset to the wp_get_attachment_image method and wonder how is this possible without hardcoding the HTML image tag itself?
0
votes
1answer
79 views

Creating black and white copy of an image [closed]

I want to duplicate a image and convert it to BW with a new name but I get this warning when I try to save it with imagejpeg(): PHP Warning: imagejpeg(/srv/www/raquelfriera.test/current/web/app/...
1
vote
2answers
45 views

show first 3 thumbnails of posts in different sizes [closed]

i want to make a little Header with the 3 recent thumbnails in different sizes and start my loop with the 4th recent posts, can someone give me a function for that please? please no widgets i want to ...
0
votes
1answer
65 views

Post thumbnail throwing size limit parameters in <img>

<ul class="widget_image_2"> <?php while ( $query->have_posts() ) : $query->the_post(); ?> <li> <?php the_post_thumbnail( 'medium'); ?> <a href="<?php ...
0
votes
0answers
28 views

delete intermediate sizes previously created - Wordpress attachments

Hard to explain, so bear with me. I am working with an API, where the user sets the posts featured image on another website. I go through that API, and create/update the posts in that API. The ...
0
votes
0answers
88 views

Sharpen imageconvolution for specific sizes

How can I add a sharpening filter (imageconvolution) to only some of the several sizes of images that WordPress generates (the "thumbnail" and perhaps also the "medium")? When WordPress generates the ...
0
votes
2answers
19 views

New portfolio items appearing smaller on the grid

For some reason that I cannot understand the new items that I'm adding to my portfolio are appearing smaller in the portfolio grid. I'm relatively new to this, so I'm completely lost. If it were ...
1
vote
0answers
31 views

Scaling images for mobile

I'm feeding a mobile app from WP. I want the images uploaded to be rescaled like x0.5, x0.3 . add-image-size doesn't give me scaling functionality, only resizing by pixel. Any Idea? thx.
0
votes
2answers
1k views

How to exclude an image size from the Wordpress srcset

Wordpress srcset is a great feature but there are occasions when it's important to control exactly which image sizes are included in the srcset code. For example, on one of our sites we generate a ...
0
votes
2answers
229 views

Make medium_large images available to insert into post

Our post have a Max width of 768, so using the medium_large images is the preferred size for our authors. I ssumed since medium_large isnpart of core, this would be included but I don't see an easy ...
1
vote
1answer
14 views

Remove Size images without use

If possible know that size image are not used in my theme? Example: If use a theme that have 10 size. But I think that I don´t use all images size. Is possible know that size I don´t use? Sorry for ...
0
votes
2answers
28 views

Wordpress can't detect any thumbnails size?

Wordpress can't detect any thumbnails size, I re-generated all image but not work. The plugin (Simple Image Sizes) can detected all thumbnails size settings. But when I want to use, it can't detect ...
0
votes
1answer
32 views

How to resize image in wordpress from backend? Seems like bug in wordpress

I'm trying to resize images to smaller sizes using wordpress admin. But I have trouble doing it. I have selected an image and opened it for editing. Original dimensions of my image is 255 × 300. ...
0
votes
2answers
441 views

How to change the catalog product image size by product id?

I am wondering if I could change the size of one specific catalog product image. I have many products with the same size (catalog images-not single product images, not even product thumbnails) and I ...
1
vote
1answer
408 views

If I Regenerate Thumbnails, would WordPress delete the existing Thumbnails and replace them with 'new copies'?

I am currently working on a website, which has 1,000's of Product Images. All of these images were uploaded, without being optimized accordingly. For instance, most of the Product Images were ...
0
votes
1answer
39 views

Image large size [closed]

My website http://www.mixtalk.in/ uploaded feature images seen in extra large size which is not better please help