-
-
Notifications
You must be signed in to change notification settings - Fork 403
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
Document existing system for logos images in taxonomies and design new system #7447
Comments
I would say, have the file name in the taxonomy, it would be some kind of self documentation. For size, maybe add a check in the CI ? |
Also these images should percolate to Robotoff. |
This issue is stale because it has been open 90 days with no activity. |
@stephanegigandet can you explain what the plan is for svg file resolution? Adding size numbers in the filename of a SVG doesn't make sense to me. Does an existing SVG have to be converted to adjust the resolution, or is it enough to take into account the aspect ratio and fix the smallest side to 90px to come up with the other dimension? Also, what other files would have to be added/changed? I did notice links in https://github.com/openfoodfacts/openfoodfacts-server/blob/main/taxonomies/labels.txt and https://github.com/openfoodfacts/robotoff/blob/main/data/label_logos.json (only after publication) |
It's enough to fix the height to 90px to get the width to put in the filename, the SVG files don't have to be changed. This is so that we can get the aspect ratio from the filename only, without having to parse the SVG.
Those links are currently not used.
Those I don't know, @raphael0202 ? |
|
Problem description
Some taxonomy entries (in particular labels) have associated logo images that we display on the website. How to add those images is not obvious:
[width]x90.[svg|png]
to indicate the width of the image when the height is 90 pixels (this is to be able to specify the width of the image in HTML)fr:ab-agriculture-biologique
->ab-agriculture-biologique.74x90.png
)html/images/lang/fr/labels/ab-agriculture-biologique.74x90.png
It is possible to have different images for different languages.
Desired solution
We may want to define a better solution to handle taxonomy images. We probably need in particular to get a fresh look at the requirements, beyond just displaying the logos in the website.
It could be useful to keep high resolution images (for PNG), and have an automated process to scale them / rename them into smaller images.
Part of
The text was updated successfully, but these errors were encountered: