Hello, I tried the method at the following link to disable image sizes being generated by WP core”: https://advent.elliottrichmond.co.uk/how-to-disable-all-unwanted-image-sizes/
I tried this on an ‘untouched’ Twenty Twenty One theme. WP core is up to date and no plugins are active.
When I take out the line for thumbnail (first line), and my Media settings set the thumbnail to 150×150, no matter what, the thumbnail does not generate when I upload a new image (refreshed media library page too, just in case, and I’m not trying to apply this retroactively to past images).
My media settings: https://cloudup.com/cZL56bg8u74
I have tried commenting out the other lines one-by-one, then refreshing the Media library and uploading a new image to see if something else is causing the thumbnail not to generate.
Even when all the other lines are commented out (i.e. every other image size), the thumbnail does not generate. It’s only when I remove the code snippet entirely that the 150×150 thumbnail comes back when I upload a new image.
See screenshot when code is enabled (without the thumbnail line): https://cloudup.com/cLAwg6E-sSo –> The 150×150 thumbnail is not generated.
And when I remove all of it: https://cloudup.com/ciyBSt3Raa3 –> The 150×150 thumbnail is generated.
Code I’m using in functions.php in Twenty Twenty One is as follows:
// disable generated image sizes - https://advent.elliottrichmond.co.uk/how-to-disable-all-unwanted-image-sizes/
function shapeSpace_disable_image_sizes($sizes) {
unset($sizes['medium']); // disable medium size
unset($sizes['large']); // disable large size
unset($sizes['medium_large']); // disable medium-large size
unset($sizes['1536x1536']); // disable 2x medium-large size
unset($sizes['2048x2048']); // disable 2x large size return $sizes;
}
add_action('intermediate_image_sizes_advanced', 'shapeSpace_disable_image_sizes');
// completely disable image size threshold - https://developer.www.ads-software.com/reference/hooks/big_image_size_threshold/
add_filter( 'big_image_size_threshold', '__return_false' );
When I add add_theme_support( 'post-thumbnails' );
nothing changes (it was my wild guess as to how to bring it back).
Do you know why? How can this be fixed?
I want to keep the 150×150 so that the Media Library can use that version of the image. Otherwise, in due time, I assume the Media library will be loading full-size (i.e. original) images which will take a long time to load.
Thank you
]]>In the settings for the Advanced Gallery Block I would like to be able to choose my custom image sizes for “Thumbnail Image Size” and in the link settings for “Link Image Size” if media file is selected as link target.
At the moment only the default image sizes are listed in the dropdown. My custom images sizes are not listed. If I insert a core image block, it’s possible to select the custom image sizes.
In another topic something similar was marked as resolved, but it’s not working in my installation.
Thank for your help in advance!
Sebastian
]]>It is showing the full size image instead of the thumbnail one (150×150? 300×300?).
As far as I understand, the plugin should automatically select the thumbnail size but actually it always shows the full size image (e.g. 1500×1500), simply resized on HTML/CSS.
Do I’m missing something? How could I solve?
Thanks,
Nicola
]]>Thanks!
]]>.widgets-list-layout .widgets-list-layout-blavatar {
max-width: 600px;
width: 100%;
}
and following code in functions.php
function jeherve_custom_thumb_size( $get_image_options ) {
$get_image_options[‘avatar_size’] = 600;
return $get_image_options;
}
add_filter( ‘jetpack_top_posts_widget_image_options’, ‘jeherve_custom_thumb_size’ );
Please let me know what else could I do? Thank you
https://www.ads-software.com/plugins/jetpack/
]]>I have a site using a modified child theme for Twenty Fourteen. I have a blog feed on the bottom of the home page using code below. The issue is that the blog feed images were being cropped just fine and now the new posts have the image slightly larger in height and I can’t figure out why. The site is bayareacbtcenter.com but I have removed the blog post with the issue. I added a link to the image here – in the image you can see that the middle blog has a larger image for some reason. https://bayareacbtcenter.com/other-inventories/procrastination-questionnaire/
Any ideas?
<div class=”blogfeed_cont”>
<div class=”container”>
<div class=”blogfeed_left”>
<h2>Blog feed</h2>
<ul class=”feed_list”>
<?php query_posts(‘category_name=blog&posts_per_page=9&order=ASC’);
while(have_posts()): the_post();
?>
</div>
<?php endwhile; ?>
<i class=”clear_0″> </i>
</div>
]]>The whole thing seem constricted by the overall width allowed, I have look in Twenty Fourteen style.css and found a few items in size around the overall 4 column width of 474px and I have tried increasing these but nothing happens. It seem there is an overall width restriction, but which isn’t there on a normal blog page, just on woocommerce pages.
I’ve looked in Firefox with Figbug but can’t find anything.
The template works well on my smartphone when it’s in 2 columns.
Does anyone know what controls this?
]]>