Image Placement #
This section allows you to configure all the images that will be inserted into your posts.
- In the free version of the extension, you can configure one image location for your posts.
- In the Pro version, you can add as many locations to your posts as you want.
Here are the configurable options:
- Featured image / Inline content: The location where the generated image will appear. By default, this is the featured image. It is also possible to generate the image anywhere in the post content. With compatibility enabled (pro version), you can also insert images into CMB2/ACF/Meta Box (metabox.io) fields.
- Image Source : This is the source of the image you want to insert.
- Search Based on: This is an important parameter. It determines which words are extracted from your content to search for the image.
- Title: To retrieve the title of your post/page. You can either leave the whole title or the first X words of it. If your title is long (several words), some image banks (Pixabay, Unsplash, etc.) may not return relevant results.
- Text Analyzer: This is an algorithm in Magic Post Thumbnail that retrieves keywords from the content of your post/page. Remember to define the language in relation to your content.
- Text analyser: Previous paragraph (only with ‘inline image’): To analyse the paragraph preceding the image to retrieve keywords for the image search.
Text analyzer: Next paragraph (only with ‘inline image’ ): To analyse the paragraph after the image to retrieve keywords for the image search. - Tags: The search words will be your tag. Possibility to choose the first/last tag of the post or a random one.
- Categories: The keywords are your category. Possibility to choose the first/last category of the post or a random one.
- Custom Field: Based on the value of the defined custom field. Explanation of what a custom field is.
- Custom Request: This allows you to create your own query to generate the images. You can combine words and variables such as title, category, taxonomy and tag.
- OpenAI Keyword Extractor: Allows you to extract your main keyword based on your title (1 or 2 words) with OpenAI to get a more relevant image (e.g. with Pixabay or Unsplash). The API key has to be filled in.
- Translate to English: The “based on” phrase /keywords will be translated into English. This helps to get better results with most image databases.
- Selected Image: This will either be the first result in the image bank or a random result. The random result can be useful in some cases, for example, if you generate a large number of images with “Based on” in the same category.
Post-Processing Image #
- Image Naming Convention: The names of the image files to be imported into the media. This can either be related to the title of your post/page, the current date or a random number.
- Overwrite featured images: This option allows you to overwrite the featured image of a post/page. If the box is checked, each time you generate an image on an article that already has the featured image, the generation will still take place.
- Image Modifications: Allows you to make changes to the image to make your images unique. The two options available are “Flip horizontally” (be careful if there is text on the images, it will become unreadable in this case) and “Crop the image by 10%” to crop the image by removing 10% of the edges of the image.
- Add ALT Attribute to Image: Add an alt tag to the image: Add an alt tag to the image (see the explanation of why it’s important). You have two different choices: either get the alt text from your source or get the same text as your text “based_on” option (for example the title of your post if you chose this option). You can also enable translation of the alt text from English to the language of your site.
- Add caption tag on image: Add the <caption> tag below images in order to add an image caption. You can specify either the author’s name or the author’s name + the name of the image bank.
Pre-Processing & Developper #
- Hooks: “Save Post” & “WP Insert Post” Hook : Every time you create or update a post, an image is generated. Warning: Use with caution. If you don’t understand what it is, disable it. Hook post type : Allows you to specify the post types for which you want to fire the hook.
- Strict Search Mode: In strict search mode, quotation marks are added to the search term. Note that this option can significantly reduce the number of results.
- Interval: The “Interval” function allows you to separate each image generation by a few seconds. If you make too many requests to Google, you could be temporarily blocked; “Interval” solves this problem. You can set the value to “1 or 2 per minute”, for example.