Featured Image: A Plugin for Pelican
This Pelican plugin extracts an image from the summary or content of an article or page if not already specified in content metadata.
Installation
This plugin can be installed via:
python -m pip install pelican-featured-image
As long as you have not explicitly added a PLUGINS setting to your Pelican settings file, then the newly-installed plugin should be automatically detected and enabled. Otherwise, you must add featured_image to your existing PLUGINS list. For more information, please see the How to Use Plugins documentation.
Usage
To override the default behavior of selecting the first image in the article's summary or content, set the image property the article's metadata to the URL of the image to display, e.g:
Title: My super title
Date: 2010-12-03 10:20
Category: Python
Tags: pelican, publishing
Slug: my-super-post
Author: Alexis Metaireau
Summary: Short version for index and feeds
Image: /images/my-super-image.png
Article content...
Page
To include a representative image in a page add the following to the template:
{% if page.featured_image %}
<img src="{{ page.featured_image }}">
{% endif %}
Article
To include a representative image in an article add the following to the template:
{% if article.featured_image %}
<img src="{{ article.featured_image }}">
{% endif %}
Contributing
Contributions are welcome and much appreciated. Every little bit helps. You can contribute by improving the documentation, adding missing features, and fixing bugs. You can also help out by reviewing and commenting on existing issues.
To start contributing to this plugin, review the Contributing to Pelican documentation, beginning with the Contributing Code section.
License
This project is licensed under the AGPL-3.0 license.
Release files for pelican-featured-image 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pelican_featured_image-1.1.0.tar.gz | 4.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pelican_featured_image-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.5 kB
Release files / pelican_featured_image-1.1.0.tar.gz
| Download URL | pelican_featured_image-1.1.0.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
08369c51458c6dff48a5f0338aa26c7388121ff37607695ca7365911db5e7b2d
|
|
BLAKE2b-256 checksum How to use checksums |
ec27c73a5fd09a65ab37d1910102355776df3d19248ad8da1cc4d4884e3959f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 18, 2025.
Transparency logRelease files / pelican_featured_image-1.1.0-py3-none-any.whl
| Download URL | pelican_featured_image-1.1.0-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
52d3192b542b5b2bd0b0222e4936567c0448687a500d0fbbe6e105a565f9ac13
|
|
BLAKE2b-256 checksum How to use checksums |
7437b296a149b69e3167a41a18eabd868ddc977f61e82f4c5e31f69a0516a9dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 18, 2025.
Transparency log