Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to use images in site content #1501

Open
thibaudcolas opened this issue Mar 26, 2024 · 1 comment
Open

Ability to use images in site content #1501

thibaudcolas opened this issue Mar 26, 2024 · 1 comment

Comments

@thibaudcolas
Copy link
Member

Part of recommendations from user research report in #1496

Specifically:

Enhancing Media Presence in the News Section to Leverage Visual Potential and Share Collected Images

Posts like Welcome our new Fellow - Sarah Boyce or DSF Board 2024 Elections – New board members 👋 would really benefit from imagery.

@jacklinke
Copy link

From discussions yesterday, it looks like the input for content currently allows either ReStructured Text (RST) or raw html with tags and all.

The only option for including images at this time is to link to an image hosted externally, which then introduces the risk that the external source may disappear, causing broken images in Django Project's content.

Some potential solutions are to use a new field. In any of these cases, a model change & migration, template changes, and a data migration from the current text (and html tag) content would be required, but the end result should be that content is much easier to customize, and images can be hosted on DjangoProject's infrastructure, rather than relying on external resources.

Use a StreamField, content editor, or similar

These offer some of the capabilities of Wagtail's StreamField in a lighter-weight package. Blocks of rich text and images can be included in the page.

django-streamfield

django-content-editor

Use a Markdown field

django-markdownx

The most feature-complete and updated package for markdown editing that also includes image uploads that integrate with django. I have used this package, and it is easy to set up and use.


Is there an appetite for including a new dependency like one of the fields mentioned above?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants