-
Notifications
You must be signed in to change notification settings - Fork 26
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
Focuspoint, use resize instead of thumb #106
Comments
I'm not sure I understand your suggestion correctly. Currently, focuspoint only works with File models. This is required, since we need to store the focus point data somewhere. You output the file now using
I see that benefit, but you'll never get a focuspoint image as a string since it only works with File models. |
Yes, I understand that focuspoint can only work with file model, you need that popup to place the point, and it's not available outside file model. The idea in the thread is more to keep the same syntax when you want to resize images, fileupload or not, focuspoint or not. For example, I use a partial for my image, to avoid code repetition, I prefer to call a partial like this :
And then, in my partial have
But, when I deal with focuspoint, I have to add some conditions to use .focus instead of |resize, that's not ideal. Another small benefits of overriding |resize is that I'm not sur that thumbnails have the same save logic in october, and using the same would make cache cleaning easier (console command tu purge thumbs etc...) |
Hello,
The focuspoint use the old thumb method of october to resize images. It would be great to update it and use the resize method instead.
The biggest benefit of the switch is that resize method accept fileupload object AND path string.
I think the best solution would be to keep the |resize filter, and add focuspoint styles if the image is a fileupload widget that use focuspoint. Like that, your frontend syntax don't change even if you add focuspoint to a fileupload widget later.
If it's not possible, would be great to have a |focus filter that would behave exactly like the |resize filter, but that would add focuspoint features to fileuploadwidget that use it (but also accept a simple string path like the |resize filter)
What do you think about it ?
The text was updated successfully, but these errors were encountered: