@rafaviana Thanks for your reply.
If the redirect to attachment feature isn’t working as expected, it could be the result of either the site/server cache, or another plugin/theme interfering with the redirect functionality.
If you clear your cache (server, plugin/theme, browser, or CDN such as Cloudflare) does this resolve the issue? If you are not sure how to clear your server cache you should speak with your host provider. We have information on how to clear your browser cache at the following link: https://yoast.com/help/how-to-clear-my-browsers-cache/.
If you have cleared all caches and confirmed both WordPress, Yoast SEO, and all of your site’s other plugins and themes are up to date and the problem is still occurring, we would next recommend performing a conflict check. A plugin or theme conflict can sometimes cause functionality problems, errors, or unexpected behavior from the plugin. If you are unfamiliar with checking for conflicts, we have a step by step guide on how to check for conflicts available here: How to check for plugin conflicts.
Test this on your development or staging site, if you have one. If not, we recommend using the?Health Check & Troubleshooting?plugin. This plugin allows you to run a conflict check?without affecting normal visitors to your site.
Can you please confirm you have performed a complete conflict check by disabling other plugins, and resetting the theme to a default such as TwentyTwentyOne and let us know the results?
If you do not feel comfortable to do this yourself or if this does not solve your issue, our Yoast SEO Premium plugin comes with one year of (technical) support.