Skip to main content
# Wagtail News Image

This [Django](https://www.djangoproject.com/) app provides an inline image block for the Draftail WYSIWYG editor.

You can play with this plugin on a demo site [here](https://github.com/MattSegal/wagtail-news-image-demo).

This image block supports:

- upload
- search
- resize
- captions
- hyperlinks

This is what the image block looks like in the Draftail WYSIWYG editor:

<img src="./screenshots/WYSIWYG.png" alt="Wagtail WYSIWYG view" width="500px"/>

Clicking on the block reveals a modal, which allows you to edit the image:

<img src="./screenshots/modal.png" alt="Wagtail editor modal" width="500px"/>

## Installation

In `settings.py` you need to register the app in `INSTALLED_APPS`

```python
# settings.py

INSTALLED_APPS = [
# ...
'wagtailnewsimage',
# ...
]
```

In `urls.py` you need to add `wagtailnewsimage.urls`. The base url (`wagtailnewsimage/`) can be configured to be whatever you like.

```python
# urls.py
urlpatterns = [
# ...
path(r'wagtailnewsimage/', include('wagtailnewsimage.urls')),
# ...
]
```

In `models.py` you need to add `news-image` to your RichTextField features whitelist

```python
# models.py

class MyPage(Page):
body = RichTextField(features=[
# ...
'news-image',
# ...
])
```

## Dependencies

* Wagtail (2+)
* Django (1.11+)
* Django Rest Framework (3+)


Release files for wagtail-news-image 0.0.2

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-news-image 0.0.2
File Size Uploaded
wagtail-news-image-0.0.2.tar.gz 229.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wagtail-news-image 0.0.2
File Interpreter ABI Platform
wagtail_news_image-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 461.4 kB

Release files / wagtail-news-image-0.0.2.tar.gz

Download URL wagtail-news-image-0.0.2.tar.gz
Size 229.4 kB
Tags Source
SHA-256 checksum
How to use checksums
45fef7393bf7f0a672a07697a2e4fcfe7ea00b7d65d4848f831c54ab45a46599
BLAKE2b-256 checksum
How to use checksums
7b9c5a4ebf8da08fbfcd2640e52482519aac99165df0d304fda8628b2d98affa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.3

Release files / wagtail_news_image-0.0.2-py3-none-any.whl

Download URL wagtail_news_image-0.0.2-py3-none-any.whl
Size 232.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6709c0fc7bc36a26f723809e456f2453e4498c9ef5e9d00532a993b6c15026f1
BLAKE2b-256 checksum
How to use checksums
743b6dbe58ba53d9c39b590a6ad4c282c76ea9d9f581500927cd3492d711e412
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.3

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

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