Comments (5)
Hey @cyrillbolliger
Yeah, I ran into the same issue. The issue is not only that there’s no large
image size, it’s also that Yoast grabs the data from the metadata of an image, which is usually saved in the database.
With Timmy v14.0, Timmy will generate that image metadata just like it would for default WordPress images. So, to make it work, you have to:
-
Define a
large
image size in your image configuration for Timmy.'large' => array( 'resize' => array( 1400 ), 'show_in_ui' => false, ),
-
Run Regenerate Thumbnails to generate the image metadata for the database.
from timmy.
Hi @gchtr
Thanks for your lightning fast response. I just tested your proposed solution: It works if I regenerate the thumbnail. However if I upload a new image, it doesn't solve the problem. I still have to regenerate the thumbnail after uploading a new image in order to get it working.
Grüess uf Winti ;)
from timmy.
Hi @gchtr
I found a workaround meanwhile, I'll post it here in case it helps someone else. It basically just adds the size 'large' again:
add_filter( 'intermediate_image_sizes_advanced', function ( $metadata ) {
$metadata['large'] = array(
'width' => 1200, // some value that comforts facebook etc.
'height' => 0,
'crop' => false,
);
return $metadata;
}, 11 );
from timmy.
Hey @cyrillbolliger
That’s a cool little workaround! Small note for myself and others: Using the intermediate_image_sizes_advanced
will use the default WordPress image resizing functionality instead of Timmy’s.
However if I upload a new image, it doesn't solve the problem. I still have to regenerate the thumbnail after uploading a new image in order to get it working.
That’s strange! I just tested it, and when I drop an image in the Media menu in the backend, the meta data is generated.
Timmy returns an empty array for intermediate_image_sizes_advanced
to prevent running the default image generation of WordPress. This is for performance reasons. That filter is called in wp_generate_attachment_metadata()
, which later also calls the wp_generate_attachment_metadata
filter, where Timmy builds up the sizes array for the meta data.
So I have two questions for you:
- Where do you upload the image?
- Can you check whether another plugin might interfere by disabling all other plugins and try it again?
Thinking of this, I could probably use the wp_get_attachment_metadata
filter to generate the sizes array for the meta data on the fly, if it’s not present
Liebi Grüess zrugg nach Bern
from timmy.
Gosh, I completely forgot this issue, I'm very sorry! As you edited the last response, it reappeared in my feed...
Where do you upload the image?
It works, if I upload the image as content image. However if I upload it in the social section of Yoast SEO metabox as facebook image, it doesn't. Neither if I upload it in the media library (if the Image isn't linked in the content elsewhere).
Can you check whether another plugin might interfere by disabling all other plugins and try it again?
I tried to disable all except ACF and Yoast SEO, but it didn't make a difference.
from timmy.
Related Issues (20)
- Responsive images for gutenberg editor HOT 8
- Uninitialized string offset: 0 error HOT 3
- Undefined index: file_src when uploading file HOT 7
- Running filters during upload HOT 3
- "sizes" attribute set even when no "srcset" is availible, violating w3 check HOT 3
- wp_make_content_images_responsive() deprecated in version 5.5 of Wordpress HOT 3
- get_timber_image_responsive_acf doesn't deliver image but error message HOT 1
- Support wordpress loading="lazy" feature (since 5.5) HOT 2
- Do not upscale/overize in filter_image_downsize HOT 6
- Timmy tries to resize video files HOT 6
- PHP warning in timber_should_resize HOT 2
- Content images from Gutenberg are not always detected due to wrong regex HOT 3
- Media Library Thumbnail Size not working HOT 3
- How to allow custom image size or disable custom image size within admin
- Cannot use timmy responsive content images with wordpress responsive images in combination HOT 1
- When the timmy/generate_srcset_sizes is set to true the 'oversize' option is ignored HOT 2
- Provide a Timmy::VERSION constant HOT 1
- Responsive remote/external/CDN image HOT 4
- lazy_src in picture_responsive HOT 1
- Notice: Trying to access array offset on value of type bool in mindkomm/timmy/lib/Image.php on line 499 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from timmy.