Best practice for Django inline images in TextField?

Viewed 26

I have a portfolio site that I am building, and I will be porting a bunch of posts from my GitHub sites, all in Markdown. Thankfully, I have Markdown, and LaText math is working great on the site. However, I can not get images working in the blog body, which is a TextField. I have images working elsewhere on the site.

I am looking at django-tinymce and django-inline-media as possible solutions. Any thoughts on these or other alternatives?

This is what I have tried in my body so far, with many variations on the path to the image:

### MD

![img]("images/my_image.jpg")

### HTML

<img src= {{ "images/my_image.jpg" }} alt="My image">

With the following turned on in urls.py.

from django.contrib.staticfiles.urls import staticfiles_urlpatterns
...
urlpatterns += staticfiles_urlpatterns()

### Static

<img src="{% static "images/my_image.jpg" %}" alt="My image" />
0 Answers
Related