-
Notifications
You must be signed in to change notification settings - Fork 33
feat: add image focal point picker capabilities #58
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
base: main
Are you sure you want to change the base?
Conversation
|
Hi everyone, @federicobadini thanks for putting this RFC together. CC @Bassel17 @derrickmehaffy @alexandrebodin @pierreburgy +1 from me. Our company needs this feature in production and it is becoming a release level blocker for us. We have content heavy properties where the same image is reused across many breakpoints and placements like hero banners, cards, and social previews. Without a focal point or safe area per asset, the generated crops often cut off the subject and editors are forced to re upload multiple pre cropped variants, which does not scale and creates a messy asset library. If possible, we would really like to see this included in the next release cycle. Even a first version that supports setting a focal point on the asset and having image transformations respect it would immediately unlock a lot for teams like ours. |
|
This would be huge, we desperately need this feature. Our content-type schemas will otherwise be cluttered with fields to select focal point. |
This feature allows users to set a focal point on images directly from the media gallery. The focal point coordinates are stored as percentage values (x, y) and can be used by frontend applications to intelligently crop images while preserving the most important part of the image. Changes: - Add focalPoint field to file schema (JSON type with x, y coordinates) - Add FocalPointActions component for confirm/cancel actions - Add styled components for focal point UI (aim marker, halo) - Update PreviewBox to handle focal point selection via click - Update EditAssetContent to manage focal point state and display - Add validation schemas for focal point (0-100 range) - Update upload service to persist focal point data - Add translations for focal point UI elements Based on RFC: strapi/rfcs#58
|
@douwepausma @MihaiSandor only review required ;) |
|
Sorry everyone for the late reply. Thank you @Schero94 for this amazing contribution! |
|
Great to see this feature moving closer to Strapi core — and thanks to @Schero94 for picking this up and delivering an updated PR based on the original proposal. One small note: we’re not sure the current contribution guidelines still match how the process works in practice. We went through the RFC route two years ago, but it didn’t lead to any discussion or follow-up. Since the guidelines still present RFCs as the recommended path for changes that impact core or all users, a bit of clarification could help future contributors avoid that path if that's no more the way to go. Looking forward to seeing this land! 🎯 |
|
@federicobadini tbh i didn't pick it, i asked @pierreburgy and i asked him, give me something to do this was one idea of him, so i said well let's do it! 😁 |
|
@federicobadini I must admit we've haven't always led by example when it comes to community contributions (including pull requests reviews). The size of our team is limited but, as mentioned here, we want to do more with the community this year. @Schero94 you deserve all credits :) |
RFC: https://github.com/iFixit/strapi-rfcs/blob/main/rfcs/xxxx-focal-point.md
Diff: strapi/strapi@main...iFixit:strapi:main