In one of the recent projects, I need a feature that allows WordPress to auto-generate embed code for every image uploaded. Visitors can simply copy and paste this code to embed the image on their sites.
Instead of having to write it manually after uploading every image, I need a way to automate the process.
Introducing the Infographic Embedder plugin.
While the plugin is developed with infographics in mind, you can use it for any image too.
1. Install the Infographic Embedder plugin.
2. The plugin will register a new metabox in your normal post editor at the bottom right.
3. Every time you have uploaded the image, click on the Text tab next to Visual on your post editor. Copy the image URL. It should be very obvious. You may use an external image as well.
4. After hitting the Publish button, you’ll see the box with embed code at the bottom of the post. You might need to tweak the CSS to suit your theme appearance.
The plugin will grab the alt parameter of the image and this is really good to boost your SEO. However, I found this plugin lack of flexibility to change the text at the bottom of the image embedded on user’s site.
Although this plugin will not fully automate the process, it really saves your time.
Don’t forget, you may also want to fork the plugin on Github, change the text from the core file, add support to Custom Post type etc. Although it’s not a good idea to edit the plugin’s core file, that’s the only way to do it at the time of writing. Hopefully, the plugin’s author will add those features soon.
Leave a Reply