Jetpack AI: featured image generation may fail when the post content has custom HTML instead of blocks
This was reported by an user:
My post had no text content blocks, just a title and custom HTML code. When I try to generate a featured image with AI, with or without text in the dialogue prompt, I get this error message: An error occurred while generating the image. Please, try again!
📌 REPRODUCTION RESULTS I'm uncertain on this. I can't replicate the issue, but it might be due to the HTML code I added. For the record, the Custom HTML Block on my test site is a really simple code:
<h2>HTML Buttons</h2>
<p>HTML buttons are defined with the button tag:</p>
<button>Click me</button>
Keeping this open since the issue is already assigned to Jetpack AI Board :)
📌 FINDINGS/SCREENSHOTS/VIDEO I was able to have a featured image with a title and Custom HTML Block:
📌 ACTIONS
- Triaged
Another user at 8976938-zd-a8c reported a similar error. They don't have custom HTML blocks but the when they try to replace the existing featured images using AI, it shows An error occurred while generating the image. Please, try again!
Check the below screen record for example from the user's site: https://github.com/user-attachments/assets/96ef56f5-0560-4972-a606-1584f99e9cf2
But when I added an Image block and tried generating an image with AI, that worked. So the issue seems to be with AI Featured Images only.
Support References
This comment is automatically generated. Please do not edit it.
- [ ] 8976938-zen