Renatho
Forum Replies Created
-
Hey @snakeeater!
If it’s working for you, and only the list is showing those options, you can add another filter in the
intermediate_image_sizes. The function used to list the options in the Regenerate Thumbnails page isget_intermediate_image_sizes, and it adds some options by default ($default_sizes) as you can see in this here: https://developer.wordpress.org/reference/functions/get_intermediate_image_sizes/Forum: Plugins
In reply to: [Regenerate Thumbnails] Can’t regenerate thumbnailsDo you see the same error when trying to access the following endpoint through the browser?
/wp-json/regenerate-thumbnails/v1/featuredimagesYou should see “Sorry, you are not allowed to do that.”.
If you see the same message “No route was found matching the URL and request method.”, something is happening with the whole Regenerate Thumbnails API in your site. Otherwise, it could be something only with the regenerate endpoint.
I recommend you trying to disable other plugins and change the current theme trying to understand where the problem comes from.
Forum: Plugins
In reply to: [Regenerate Thumbnails] Getting an errorHey there!
I think you meant “Unable to load the metadata for this attachment.”, right?
Were your images uploaded through WP-admin using the core functions? I ask you because probably the reason is that your attachments doesn’t have metadata (you can get the ID of your attachments, and check the
_wp_attachment_metadatain the{PREFIX}_postmetatable).I tried to remove it, but if it doesn’t exist, it should also be re-created while regenerating. For some reason it’s not working for you. Are you able to debug the code to understand what’s happening? You could also try to disable other plugins or your theme, and try again (re-uploading a new attachment) to test.
It’s probably where the error is happening: https://github.com/Automattic/regenerate-thumbnails/blob/master/includes/class-regeneratethumbnails-regenerator.php#L571
And here is where the meta should be created if it doesn’t exist: https://github.com/Automattic/regenerate-thumbnails/blob/master/includes/class-regeneratethumbnails-regenerator.php#L193
I hope it helps you!
Forum: Plugins
In reply to: [Regenerate Thumbnails] Plugin generating thumbnails that don’t exist.Hey there!
It’s hard to say what’s happening in your case. Maybe do you have some custom filters on your site? Or plugins/theme that can be conflicting with Regenerate Thumbnails? I’d recommend you disable custom filters, plugins, and your current theme, in order to see if the issue is fixed. So maybe you could figure it out what’s happening in your site.
Also, you can check how are the sizes in your WP-admin > Settings > Media.
I hope it helps you. π
Forum: Plugins
In reply to: [Regenerate Thumbnails] Skipped AttachmentsHey Giulio!
I think it’s very likely. I don’t know how exactly “ewww image optimizer” plugin works, but for now WP doesn’t support the WebP yet, and Regenerate Thumbnails uses WordPress core functions.
You can follow this ticket for more details on how it’s going: https://core.trac.wordpress.org/ticket/35725
There are some very recent movements there. Hopefully, it’ll have a good support soon! =)
Forum: Plugins
In reply to: [Regenerate Thumbnails] Thumbnails not generatedHey there!
It should create the thumbnails in the correct size in your uploads folder. But if it’s not working well, maybe there is customization in your site conflicting with it. You could try disabling your plugins/theme in order to understand what’s happening. π
I hope it can help you!
Forum: Plugins
In reply to: [SyntaxHighlighter Evolved] font size on mobileπ€
If it’s not an issue with the theme, probably some plugin can be adding some style which can be causing this issue.
I’d recommend you inspect the styles to check where it’s coming from.
As a first try, you could just simulate the mobile view in your browser (https://developers.google.com/web/tools/chrome-devtools/device-mode). If it doesn’t happen in the browser, you could inspect it through your mobile (Instructions for Android: https://developers.google.com/web/tools/chrome-devtools/remote-debugging)
Hey @hasaanch!
You are correct! The WordPress uses the original one as source to recreate the other dimensions, and the Regenerate Thumbnails plugin leverage this feature from the core.
If you want to regenerate your thumbnails based on your watermarked image, I’d recommend you temporarily rename your biggest watermarked image to the default image name, and after regenerating the thumbnails, you can replace the original back to the non watermarked.
Another approach I found, would be using the
wp_get_original_image_path(https://developer.wordpress.org/reference/hooks/wp_get_original_image_path/) temporarily when you run the script. So you can change the$original_imageto the biggest one. But this approach will generate images with the incorrect name, like:image-2048x1024-150x150.png, so after the regeneration process you would need to rename your images removing the-2048x1024.Considering that you need to rename your images manually (or through script), I think the first approach would be the easier for you.
I hope I was helpful. π
Forum: Plugins
In reply to: [Regenerate Thumbnails] Error Message Thumbnails Not RegeneratingHey @nycplugged !
I was checking the part of the code that would give you this message. And it should be adding some details to your console too. Could you check that? Probably there is some clue about the real issue to be solved.
The part of the code which should be adding the log to the browser is:
https://github.com/Automattic/regenerate-thumbnails/blob/f5c2d2051766ab76e8f35ddc6103dfd460a0987e/src/routes/subpages/HomeRegenerateMultiple.vue#L124Forum: Plugins
In reply to: [Regenerate Thumbnails] Cannot regenerate but no reason whyHey @hollyrusak !
Could you check the server response? The request is a POST with the path: /wp-json/regenerate-thumbnails/v1/regenerate/{ID}
I believe we’ll likely find some clue in this response. π
If you aren’t familiar with how to inspect the network in your browser, you can see some instructions here: https://developers.google.com/web/tools/chrome-devtools/network and here: https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor
Forum: Plugins
In reply to: [Regenerate Thumbnails] File is not an image msgsCould you try to re-export these images to see if it fixes your issue? Maybe it has a different format and it was renamed, or maybe it’s just corrupted.
The error you mentioned is probably coming from a WP core validation. You can try to simulate a check that WP does in your image using this method: https://www.php.net/manual/en/imagick.valid.php
It would be something like that:
$image = new Imagick(); $image->readImage( '/your/image/path/here' ); image->valid() // It returns if your image is valid.If nothing helps, could you send here the link to these images? So we could try to reproduce the issue.
Forum: Plugins
In reply to: [Regenerate Thumbnails] Version 3.1.3 and PHP 7.4 compatibilityHi @lilymac !
Yes! It’s compatible! I recommend you update the plugin to the v3.1.4 though.
Forum: Plugins
In reply to: [Regenerate Thumbnails] Uodated theme and it doesn’t show in toolsHey @excelwell!
If I understood correctly your issue, the Regenerate Thumbnails plugin is not appearing in your wp-admin menu, correct? Maybe you can try to access directly the link: https://www.shop.excelwell.net/wp-admin/tools.php?page=regenerate-thumbnails
And to fix that, I’d recommend you contact the theme developers.
By the way, your site didn’t load to me (some error with SSL).
> I recently updated to the latest WordPress 5.5.3 or what ever the latest version is. Is the Regenerate Thumbnail plugin compatible with it?
Yes! The Regenerate Thumbnails is compatible with WordPress 5.5.3 π
Forum: Plugins
In reply to: [Regenerate Thumbnails] Regenerate by Month UploadedHey @mattm3 !
There is not a configurable solution, but there is a “hacky” solution that you could use. Each time you need to regenerate the thumbnails, you can temporarily add this filter to your site, so it will filter your attachments based on the dates you set.
add_filter( 'rest_attachment_query', function( $args, $request ) { if ( empty( $request['is_regeneratable'] ) ) { return $args; } $args['date_query'] = [ 'column' => 'post_date', 'after' => '2020-12-01', 'before' => '2020-12-30' ]; return $args; }, 10, 2 );I hope it can help you! π
Forum: Plugins
In reply to: [Regenerate Thumbnails] Not doing anythingHey @aeim!
Not sure what was the issue with that site, but I’d recommend change the theme or deactivate other plugins because some of them can be making some changes with the images. π