You were very close. You just had a single-quote swapped with a double-quote after the onmouseover.
<figure class="wp-block-image">
<img src="https://website.com/wp-content/uploads/2019/08/image1.png" onmouseover="this.src="https://website.com//wp-content/uploads/2019/08/image2.png";" onmouseout="this.src="https://website.com/wp-content/uploads/2019/08/image1.png";" alt="alttext" class="wp-image-1111"/>
</figure>
I usually place semi-colons after the single-quotes to make it easier to tell when your quotes are balanced, whether Javascript requires it, or not.
Related Posts:
- Gutenberg block HTML image rendering override
- How to extend the gallery block in Gutenberg?
- Set default image link target in Gutenberg image block
- WordPress adding scaled images that don’t exist (1536×1536 and 2048×2048)
- get_post_gallery with Gutenberg
- How to include externally hosted images into a gallery block
- Adding HTML within an image title attribute
- Apply image width to tag
- alt, title tags not showing
- How to link Gutenberg Gallery images To Media file automatically?
- How to Add extra option to Image Block Settings?
- @wordpress/create-block image url in css
- How do I remove generated HTML around images in posts?
- How to remove buttons from gutenberg toolbar
- Extend core block attributes in post content
- Why html tags are being appended to my pictures?
- Gutenberg editor get post featured image by id
- hardcrop images in gutenberg “latest posts” block
- How to resolve – IE 6 ignores img “width” properties
- Bulk edit Gutenberg single images to change from linking to media file to attachment page
- How can I insert an image map into a WordPress blog post?
- Images will not display, when I call them up with html in wordpress, just two blank small spaces [closed]
- Prevent Image Pasting in RichText Component
- How to fix “.webp” being auto-added to the end of image urls
- Multiple amp-image overlays. How to properly do this in wordpress?
- Update an image block style programatically
- Changing default img html markup but not in admin back-end?
- Add width & height attributes to Gutenberg’s image output?
- update_post_meta attachment_image_alt description for Gutenberg
- Modifying the HTML Output of Inserted Images
- Rewrite inline image markup
- How to get the Gallery form/section just like in Gutenberg block?
- Is there a wordpress filter to edit the markup of inline images?
- How to upload and style svg logo?
- Weird failing request
- How can I check if the first block is an image aligned left or right?
- Not seeing text alignment option in Image block
- Can’t add image to site via php
- What exactly is the description field when uploading an image?
- HTML Img with data:image src gets sanitized in admin?
- Place image caption outside of figure tag (Gutenburg Image Markup)
- Change Image Size option in the settings in bulk
- How to disable a WP Image Block to link to itself?
- get_post_gallery with Gutenberg
- How to join Caption AND Description Meta Fields as one combined-caption in Image Block
- Using srcsets in a custom block
- Landing Page with HTML CSS JS and Images on wordpress
- Rebuilding core image block
- A query to substitute images paths in gutenberg (website migration)?
- Convert multiple image blocks to gallery block in Gutenberg?
- get_post_gallery with Gutenberg
- How to link to img src using HTML email template in WordPress
- Relative path not working at all in WAMP local environment
- Display ajax preloader for large images within posts
- Garbled HTML pulled for page description “caption id=attachment…”
- Imagem resolution responsive
- Forcing absolute src links in the RSS feed
- where is images/image.jpg?
- Custom filename when pasting an image from clipboard
- Issues with the excerpt (wordcount/HTML/images)
- Parallax image problem
- Hover images and Videos
- Multisite image URLs incorrect in editor
- Placing a background image with text over it
- Get field added via attachment_fields_to_edit filter in Gutenberg
- Define how an attached image is rendered
- Image size not showing up in ‘wp/v2/media’
- How to add images inside an item of a list in Gutenberg
- Adding or replacing image size
- Extend the list view in gutenberg editor?
- show hide image script after 4 seconds [closed]
- Restricting users to view only media library items they have uploaded?
- How do I disable responsive images in WP 4.4?
- Filter to remove image dimension attributes?
- How to get a list of all the possible thumbnail sizes set within a theme
- How do I get the avatar URL instead of an HTML IMG tag when using get_avatar?
- Image Upload from URL
- Programmatically adding images to media library
- How do I delete all UNUSED images from my uploads directory?
- Set default image sizes in WordPress to hard crop
- Is it possible set a featured image with external image URL
- get attachment title based on attachment id
- Stop wordpress from hardcoding img width and height attributes
- Handle issues with change of image scaling (rounding) in 4.1 (WP Ticket #18532)
- Programmatically get images by URL and save in uploads folder
- Prevent WordPress from generating medium_large 768px size of image uploads?
- remove or update add_image_size
- Get Image Description
- Image quality based on image size
- Function to get URL of original uploaded image – full size
- how to get original image using wp_get_attachment_image_src
- What is a good alternative to using $content_width for image optimization?
- get the attachement url for the medium sized image
- Can I attach image to post without adding it to post?
- Automatically replace original uploaded image with large image size
- WordPress crop tool greyed out
- How to scale up featured post thumbnail?
- Upload images to remote server
- Custom image size / thumbnail – Crop to aspect ratio even when source image is smaller than set dimensions
- Each custom image size in custom upload directory?