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
New System Thumbnail and Image Interface Preview #9162
Comments
For implementation: the desired effect is most likely "inside" instead of "contain" to prevent blackboxing the image |
cc @licitdev |
@benhaynes Is this what you're looking for? |
@licitdev Yes! That solves one issue, which is that the thumbnail was double-cropping... thank you! The other issue is that this version still crops the top and bottom. I think we want to give users the option to show an uncropped version, centered, and with "letter-boxing" to fill in the sides. To enable this uncropped option, I think we'll need to generate a second system thumbnail that uses "contain". This would also allow the File Library to have an option controlling "Crop" / "Contain". Does that make sense? I can answer questions or provide designs as needed! |
Oh, I just realized we already have a BUNCH of system thumbs!! We can just use these, but should add options to the Interface/Layout for which you want. https://github.com/directus/directus/blob/main/api/src/constants.ts#L3-L28 |
Aaaand, hopefully this helps, it should close this issue (although I'd like to have the same thing for the Card Layout). |
@benhaynes Tested your fix, works very well! 👍🏻👍🏻
Not sure if this is what you meant, the crop / contain setting exists in the Card Layout. |
Haha, of course it is... 🤦 This issue is all set then! |
Source image (landscape):
Full width preview:
The problem is that Directus first creates a square cropped thumbnail... and then sets this to
cover
within the interface. This double crops it and looks horrible. We need to add a second system thumbnail that is set to contain (800 wide by 450 tall, ~60% quality, no cropping) and add an Interface option for fit:cover
(orcrop
?) andcontain
(centered)... both of these would use the new un-cropped system thumbnail.The text was updated successfully, but these errors were encountered: