-
Notifications
You must be signed in to change notification settings - Fork 580
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
THUMBNAIL_NAMER setting does not have any effect when using filer #1093
Comments
Ah. I guess getting to the original is needed when verifying access thumbnails of secured files/images?! Making a custom namer possible on non-protected files would be a nice one, then :) |
It is for serving protected thumbnails. As far as I can see, it could be changed to support custom namer, needing to have a setting for the regex.
could be
It would then be in the users responsibility, to make finding the original file work, when serving protected thumbnails. Or, as an alternative, only use the filer namer when creating protected files. This is not preffered, as technically "protected" files still can be public. Feedback welcome! |
"Hashed only" namers would not work, but still...the alias namer is crucial for image SEO, and a real drawback if not available. |
a quick feedback from the team would be nice, like "we wont ever support" or "sure, wait, we'll do that right now, it's so easy". thanks in advance @yakky @stefanfoulis ? |
In order to work around this issue I've configured my nginx server to redirect all resized images to the original, but only on search engine user agent. In this way Google always gets the full sized image, and I don't have to worry about changing image dimensions in thumbnails. Not saying this is ideal... but seems to work well enough. |
thanks for the insight. least but ideal - you'll get really bad scores in page speed insights, this way...this being only the first thing coming to my mind ... |
I'm getting good scores on page speed insights (96 on dekstop / 54 on mobile), the bad score on mobile is due to "Defer offscreen images" and "Eliminate render-blocking resources" which we are in the process of fixing. PageSpeed uses a mobile Chrome user agant so is not impacted by this. Here is my nginx mapping if of some interest to others:
and then it's used as follows in the virtual host conf file:
|
how about digging this one out - @jrief ? I hate monkey patching ;-) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This will now be closed due to inactivity, but feel free to reopen it. |
for me, this is an important issue. please re-open. I would even think about creating a PR, since they are reviewed more efficiently now... |
@benzkji Thanks for keeping this alive! It would be wonderful if you could create a PR! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This will now be closed due to inactivity, but feel free to reopen it. |
When dealing with SEO (SmileyChris/easy-thumbnails#474) or when one just wants a different THUMBNAIL_NAMER (SmileyChris/easy-thumbnails#492), there seems to be no luck with the filer.
There is the
ThumbnailerNameMixin
, that has it's ownget_thumbnail_name()
method, where the naming is fixed, as said there "A version ofThumbnailer.get_thumbnail_name
that produces areproducible thumbnail name that can be converted back to the original
filename. : https://github.com/divio/django-filer/blob/006a1cfbdb5f61b6725b7675c7f9117e85b5d367/filer/utils/filer_easy_thumbnails.py#L32 That mixin is used for
FilerThumbnailer
, that is then created here: https://github.com/divio/django-filer/blob/006a1cfbdb5f61b6725b7675c7f9117e85b5d367/filer/models/abstract.py#L175 . I do not really get how this all works and interacts with easy_thumbnails. But the question remains: Why does filer need to override the namer, and get back to the original from the thumbnail? Normally, it would be enough to get the thumbnails, when for example deleting a file, so no orphaned thumbs are around?And finally, am I missing something in the docs, and setting a custom namer is already possible?
The text was updated successfully, but these errors were encountered: