question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make the {% image %} tag support other images known to django, not just wagtailimages

See original GitHub issue

For example on a current project, users upload a photo to represent an event, but events are submitted by the public and not everyone will have a suitable photo, so a placeholder is displayed alongside their event instead.

That placeholder image is something the developer has had to create, but as event photos get displayed in numerous places, we need to create numerous versions of that placeholder to suit the placement, which is tedious.

It would be great if the {% image %} tag could be given a path to a static image, and automatically generate the images at the dimensions we specify.

Issue Analytics

  • State:open
  • Created 9 years ago
  • Reactions:8
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
killarnycommented, Apr 6, 2020

Curious whether this is going anywhere, or has been forgotten about or replaced with other functionality that I’m not aware of?

I’m VERY new to wagtail, but already really wishing I could pass a static image path to the {% image %} tag so that I can resize user avatar images as needed in my templates.

0reactions
davecranwellcommented, Jun 25, 2015

On a more practical point, users may be integrating Wagtail with existing products and may find it tedious to have to install multiple thumbnailing tags. If wagtail could thumbnail anything, it could be a replacement.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use images in templates - Wagtail's documentation
The image tag inserts an XHTML-compatible img element into the page, setting its src , width , height and alt . See also...
Read more >
Is there a workaround for using Wagtail Image tags in views.py
in your models from wagtail.core.models import Page class MyCustomPageModel(Page): photo = models.ForeignKey( 'wagtailimages.Image', .
Read more >
Image Uploads in Wagtail Forms - DEV Community ‍ ‍
This is aptly named Wagtail Images, you can review the docs about Using Images in Templates or Advanced Image Usage for more information....
Read more >
Switch to Custom image model in a Production Wagtail project
What are data migrations? · Schema migrations: It is the most commonly used and often referred as migrations. These help to change database ......
Read more >
Release 2.6a0 Torchbox - Wagtail Documentation
To accomplish these things, we need to do more than just grab the index ... from wagtail.images.edit_handlers import ImageChooserPanel.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found