Skip to main content

wagtail-embedvideos

https://badge.fury.io/py/wagtail-embedvideos.svg https://img.shields.io/pypi/pyversions/wagtail-embedvideos.svg https://img.shields.io/pypi/djversions/wagtail-embedvideos.svg https://github.com/bashu/wagtail-embedvideos/actions/workflows/test.yml/badge.svg

Simple app that works similar to wagtailimages, but for embedding YouTube and Vimeo videos and music from SoundCloud.

The current version is tested for compatiblily with the following:

  • Wagtail version 6.3

  • Django version 5.1

  • Python versions 3.10 to 3.13

Maintained by Basil Shubin, and some great contributors.

https://raw.githubusercontent.com/bashu/wagtail-embedvideos/develop/screenshot.png

Installation

First install the module, preferably in a virtual environment. It can be installed from PyPI:

pip install wagtail-embedvideos

Requirements

You must have django-embed-video installed and configured, see the django-embed-video documentation for details and setup instructions.

Setup

Make sure the project is configured for django-embed-video.

Then add the following settings:

INSTALLED_APPS += (
    "wagtail_embed_videos",
)

Then run ./manage.py migrate to create the required database tables.

Usage

In models, implement as a ForeignKey relation, same as wagtailimages.

# models.py

from wagtail.admin.panels import FieldPanel
from wagtail.models import Page, PageBase

from wagtail_embed_videos import get_embed_video_model_string

class CustomPage(Page):
    video = models.ForeignKey(
        get_embed_video_model_string(),
        null=True, blank=True,
        on_delete=models.SET_NULL,
        related_name='+'
    )

    # ...

    content_panels = [
            FieldPanel('video'),
    ]

In templates, load the embed_video_tags library in every template where you want to use it:

<!-- custom_page.html -->

{% load embed_video_tags %}

{% video self.video.url as my_video %}
    {% video my_video 'small' %}
{% endvideo %}

Check django-embed-video documentation for more details.

Contributing

If you like this module, forked it, or would like to improve it, please let us know! Pull requests are welcome too. :-)

Credits

wagtail-embedvideos was originally started by InfoPortugal, S.A. who has now unfortunately abandoned the project.

License

wagtail-embedvideos is released under the BSD license.

Changes

6.4.0 (2026-09-06)

  • Added EmbedVideoChooserAdapter, a Telepath adapter for AdminEmbedVideoChooser (embed-video-chooser-telepath.js), so EmbedVideoChooserBlock renders and updates its thumbnail preview correctly inside a StreamField, mirroring wagtail.images.widgets.ImageChooserAdapter. Previously, StreamField silently fell back to Wagtail’s generic chooser Telepath widget, which has no notion of the preview thumbnail, so it was never created or updated for a chosen video inside a StreamField block. embed-video-chooser-telepath.js is also now included in AdminEmbedVideoChooser.media itself (not just the adapter’s), so the registration is loaded even on pages where the widget is only used as a plain field and not through a StreamField that already includes EmbedVideoChooserBlock - matching how Wagtail’s own AdminImageChooser.media does the same for image-chooser-telepath.js.

6.3.0 (2026-09-06)

  • Wagtail version 6.3 supported. Dropped support for Wagtail < 6.3.

  • Python 3.13 supported, alongside 3.10 to 3.12.

  • Django version 5.1 supported; dropped 5.0.

6.2.0 (2026-09-06)

  • Wagtail version 6.2 supported. Dropped support for Wagtail < 6.2.

6.1.0 (2026-09-06)

  • Wagtail version 6.1 supported. Dropped support for Wagtail < 6.1.

6.0.0 (2026-09-06)

  • Wagtail version 6.0 supported. Dropped support for Wagtail < 6.0.

  • Python 3.12 supported, alongside 3.10 and 3.11.

  • Django version 5.0 only; dropped 4.2.

5.2.0 (2026-09-04)

  • Wagtail version 5.2 supported. Dropped support for Wagtail < 5.2.

  • Django version 5.0 supported, alongside 4.2.

5.1.0 (2026-09-04)

  • Wagtail version 5.1 supported. Dropped support for Wagtail < 5.1.

  • Registered EmbedVideoDisplay (wagtail_embed_videos/components.py) for any ForeignKey to the embed video model, via Wagtail 5.1’s new register_display_class API. Embed video fields shown on a model’s generic inspect view now render as an actual embedded iframe instead of the video’s plain title text.

5.0.1 (2026-09-04)

  • Fixed the embed video edit and add pages, which were completely broken under Wagtail 5.0: both included wagtailadmin/pages/_editor_css.html, a template Wagtail 5.0 removed (insert_editor_css is now emitted unconditionally by admin_base.html itself, making the include redundant even before it broke). Also fixed a missing closing </div> on the edit page left over from an earlier restructure.

  • Made the video preview on the edit page responsive (scales with the viewport instead of a fixed 480x360 box), via a CSS aspect-ratio-based wrapper.

  • EmbedVideoChooserBlock.render_basic() now passes its context through to VideoNode.embed(), so StreamField-embedded videos get a correctly secure/insecure embed URL based on the current request instead of always defaulting to one or the other.

  • The homepage summary count now reflects only videos the user has permission for, rather than the total count across all videos.

  • Added djlint for template linting/formatting.

5.0.0 (2026-09-04)

  • Wagtail version 5.0 supported. Dropped support for Wagtail < 5.0.

  • Python 3.10 and 3.11 supported; dropped 3.8/3.9. Django 4.2 only; dropped 3.2/4.0/4.1.

4.2.0 (2026-09-04)

  • Wagtail version 4.2 supported. Dropped support for Wagtail < 4.2.

  • Widget’s JS hookup switched from an overridden render_js_init() to Wagtail 4.2’s declarative js_constructor attribute on BaseChooser.

  • Added multiple-choice support to the chooser (ChosenMultipleViewMixin, chosen_multiple_view_class), and preserved URL parameters on the chosen link, matching Wagtail 4.2’s ChooserViewSet conventions.

  • Fixed a URL namespace typo in the bulk-delete confirmation template (wagtail_embed_video:edit -> wagtail_embed_videos:edit).

  • Guarded the embed video listing search against an empty query string.

  • Fixed the chooser widget’s JS for Wagtail 4.2’s Chooser.openChooserModal() rewrite, which dropped the modalOnloadHandlers widget property in favour of a chooserModalClass (a ChooserModal subclass carrying its own onloadHandlers); left as-is, the widget would have silently fallen back to the default (non-customised) chooser-modal behaviour, with no error. Since ChooserModal isn’t exposed as a public global (only Wagtail’s own webpack-bundled entrypoints can subclass it directly), EmbedVideoChooser now overrides openChooserModal() to construct the inherited default modal class and swap in our own onload handlers on the instance instead.

4.1.0 (2026-09-04)

  • Wagtail version 4.1 supported. Dropped support for Wagtail < 4.1.

  • Switched get_usage() to Wagtail 4.1’s ReferenceIndex API (wagtail.models.ReferenceIndex.get_references_to(self).group_by_source_object()), replacing the old reflection-based get_object_usage(). Existing installations must run ./manage.py rebuild_references_index once after upgrading, to backfill usage data for content saved before the upgrade.

  • The embed video “usage” view now checks “change” permission on the specific instance, and resolves proper edit URLs/labels for referencing objects via AdminURLFinder; the usage template shows which field/content path each reference comes from.

  • Added a usage count link to the embed video edit page, and removed the usage_count_enabled feature-flag guard around usage counts on the delete/bulk-delete confirmation templates (usage counting is now always available via ReferenceIndex).

  • Fixed get_valid_next_url_from_request import (wagtail.admin.views.pages.utils moved to wagtail.admin.utils in Wagtail 4.1).

4.0.0 (2026-09-04)

  • Wagtail version 4.x supported. Dropped support for Wagtail < 4.0.

  • Rewrote the embed video chooser (widget, views and JS) on Wagtail 4.x’s generic chooser framework (wagtail.admin.views.generic.chooser, wagtail.admin.viewsets.chooser.ChooserViewSet, wagtail.admin.widgets.BaseChooser), replacing the old AdminChooser/ModalWorkflow-based implementation.

  • Dropped the vendored tabs.js: Wagtail 4.x exposes its own chooser-modal JS (window.Chooser, window.ChooserModalOnloadHandlerFactory) as public globals for exactly this purpose, so it’s no longer needed.

  • Dropped support for Python 3.7 (no longer obtainable via uv/ python-build-standalone; EOL since June 2023). Python versions 3.8 to 3.10 supported.

  • Excluded the tests package from the built wheel/sdist.

3.0.0 (2026-09-04)

  • Wagtail version 3.x supported. Dropped support for Wagtail < 3.0.

  • Django versions 3.2 and 4.0 supported. Dropped support for Django < 3.2.

  • Python versions 3.8 to 3.10 supported.

  • Vendored Wagtail’s own tabs.js into the embed video chooser modal, since Wagtail 3.x no longer exposes it as a public global, restoring full keyboard accessibility for the chooser’s tabbed UI.

  • Migrated packaging from setup.py/setup.cfg to pyproject.toml.

  • Switched CI from Travis to GitHub Actions.

  • Fixed broken imports.

0.5.12 (2022-04-20)

  • Fixed broken imports.

0.5.11 (2021-12-13)

  • Added ru translation.

0.5.10 (2021-12-06)

  • Fixed stupid typo.

0.5.9 (2021-12-06)

  • Wagtail version >= 2.15 supported.

0.5.8 (2021-11-12)

  • Wagtail version >= 2.14 supported.

0.5.7 (2021-11-11)

  • Wagtail version >= 2.13 supported.

0.5.6 (2021-11-10)

  • Wagtail version >= 2.12 supported.

0.5.5 (2021-11-09)

  • Wagtail version >= 2.11 supported.

0.5.4 (2021-11-08)

  • Wagtail version >= 2.10 supported.

0.5.3 (2021-11-07)

  • Replacing broken 0.5.2 release.

0.5.2 (2021-11-06)

  • Wagtail version >= 2.9 supported.

0.5.1 (2021-11-05)

  • Wagtail version >= 2.8 supported.

0.5.0 (2021-11-04)

  • Wagtail version >= 2.4 supported.

  • Dropped support for Python < 3.x.

0.4.1 (2018-08-22)

  • Wagtail version >= 2.x supported.

  • Django version >= 2.x supported.

  • Dropped support for Wagtail < 2.x.

0.3.0 (2017-04-24)

  • Changed the structure of “AbstractEmbedVideo”, because “TagSearchable” is not used anymore.

0.2.5 (2017-02-09)

  • This is the last version compatible with Wagtail <= 1.6, because TagSearchable was deprecated and then removed.

Metadata

Release files for wagtail-embedvideos 6.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wagtail-embedvideos 6.4.0
File Size Uploaded
wagtail_embedvideos-6.4.0.tar.gz 40.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wagtail-embedvideos 6.4.0
File Interpreter ABI Platform
wagtail_embedvideos-6.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 95.7 kB

Release files / wagtail_embedvideos-6.4.0.tar.gz

Download URL wagtail_embedvideos-6.4.0.tar.gz
Size 40.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b543a96a1c90c25f2161c8a34c665b4225b9398c94f42c932519619d22b5653e
BLAKE2b-256 checksum
How to use checksums
490855333600974d411ea246bbe6fb184c069535f360455bde51ceded554bdfc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 6, 2026.

Transparency log

Release files / wagtail_embedvideos-6.4.0-py3-none-any.whl

Download URL wagtail_embedvideos-6.4.0-py3-none-any.whl
Size 55.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
55fea85c8bbbcf0e4415b304ce400abf44e3b9ea90951463c8aab6181cf41284
BLAKE2b-256 checksum
How to use checksums
3bb266dbda7f722c1cf97a76b6939d52e289da286fa066ff27d97f6e7284997a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 6, 2026.

Transparency log

Release history Release notifications | RSS feed

7.0.0

2 release files

This release

6.4.0 This release

2 release files

6.3.0

2 release files

6.2.0

2 release files

6.1.0

2 release files

6.0.0

2 release files

5.2.0

2 release files

5.1.0

2 release files

5.0.1

2 release files

5.0.0

2 release files

4.1.0

2 release files

0.5.12

2 release files

0.5.11

2 release files

0.5.9

2 release files

0.5.8

2 release files

0.5.7

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page