-
-
Notifications
You must be signed in to change notification settings - Fork 698
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
Migration of product_images to 8.0 #42
Comments
! can't wait @pedrobaeza Will this module do save images on filesystem like behavior of odoo core saving attachment? |
Thanks, i'm looking forward to using it as a dependency for website_multi_image here: https://github.com/OdooCommunityWidgets/website_multi_image and website_product_swatch_extended here (currently just a placeholder): https://github.com/OdooCommunityWidgets/website_product_swatch_extended I was considering also using website_multi_image's product images system as a basis for building a module for adding product attachments for display on the website product pages (eg. product manuals in PDF, parts diagrams, etc.), however I will wait until you've released product_images, as I think this may be better suited to being modified to work for this purpose. |
I have made a PR to track the progress in #57 |
Thanks for the update, I'll watch the PR. Are there any plans to include some extra features like Alt/Title attribute, and perhaps import from URL, or local path, or are these features better added to another module to extend the base module functionality for specific use-cases? |
The alt attribute can be achieved with the name (which is the file name by default), and the other things are in the roadmap (you can see already code about this on the PR). |
Thank you. I'll check the PR. Thanks again for your work on this project, it's going to be very useful in 8.0. |
Sorry to bother you, I know you must be incredibly busy, especially with the upcoming Odoo days. I'd just like to ask if in your opinion the product_images module is model stable in terms of the image fields in the database from this repository: https://github.com/pedrobaeza/product-attribute/tree/8.0-product_images I'd like to start developing a website_product_images module that includes product_images as a dependency for eventual submission to the OCA. Here's a repository of the module in it's current state: https://github.com/OdooCommunityWidgets/website_multi_image however I will be rewriting it to use product_images as the image store before I submit a PR to OCA/website. |
Hi, Luke, today I check it if all is correct, and tell you back. |
Thank you. |
Luke, you can check in the PR #57 the module. |
Thank you sir! I'm going to start work on the website_multi_image module based on your 8.0-product_images branch: https://github.com/pedrobaeza/product-attribute/tree/8.0-product_images/product_multi_image i'll submit a PR to OCA/website as soon as I have something viable for submission to the OCA. |
Any plans to add a watermark feature for your module? I've just come across this: https://github.com/akretion/leeches-fuck which looks like it handles much of the code needed for watermarking images. I think it would be a really useful feature to have. Magento offers the option to display watermarked product images on the frontend, while keeping the backend images clean. I think this would be a very useful feature to have in Odoo. |
No, it's something not planned, but this should be done in a separated module I think. |
Thanks for the reply. Regarding the module itself (from your personal repo), i've noticed it seems to introduce a significant load time on kanban views. I'm currently working on an instance with around 4500 products with around 5-6 images each (all roughly 1200px by 800px JPG). Kanban loading times to be quite slow whether the images are stored in the local filesystem, or external URL. Have you noticed any performance issues with larger catalogs with multiple images? |
Obviously, when you add images that are external url, a request has to be made to this external site and get the image, so the performance suffer a bit. This can be improved with a cache mechanism that stores the image and only retrieve it again if there's a change on the original URL, but I didn't investigate further how to get this update-date info via HTTP (and if it's possible). |
Thanks for the reply. In my case I think implementing a caching mechanism as well as a cache-warmer may be necessary due to the size of the catalog for the instance i'll be using product_multi_image in. Do you think this would be best handled by Odoo's internal caching mechanism, or something along the lines of Varnish? |
The cache mechanism should be done from scratch I think, because I don't know any mechanism in standard about that. |
@pedrobaeza , thanks for your advice. Do you have any plans at present to build a caching mechanism into the module, or is this something you suggest I pursue on my end? |
Sorry, but this is something I can't afford now, so any help for this feature is welcome. |
Thanks for letting me know, I understand. If it's a matter of funding i'd be happy to speak my company's management to see if we can help fund the cache mechanism module. If you're too busy for this type of project right now though that's fine, we'll look into contracting someone to build it for us (and submit a PR to the product-attribute, or web OCA repo's at a later date). I personally do not have much of an understanding of the cache mechanism in Odoo, so it's not something i'll be able to build in-house. |
I'm sorry to bother you again, I understand you're incredibly busy right now. Regarding the performance issue i've just been thinking that in my case perhaps the kanban view is trying to load full-sized images from disk, as I have only imported full-size images to the following field when importing my products: image_ids/path the full-size images are still web-optimised (1200px by 800px progressive JPG's at around 75% quality), however I have a feeling that in my case this may have something to do with the performance issue i've mentioned on the kanban view for Sale >> Product. Does your module create image_small, image_medium, and image_big copies of each image when using an external URL or local file path? |
Sorry for the late reply. I was in holidays. Kanban is getting the small image (https://github.com/OCA/product-attribute/pull/57/files#diff-9a19da29afb5cb5220eb200c35694a37R76), so this is not the low-performance reason. |
Thanks for the reply. I'll keep digging to figure out the issue. I've been discussing with someone in regards to building a redis module for caching and session storage, perhaps this is key to resolving the performance issue in my case as you've suggested. |
The module is already migrated with a good abstraction layer for having multi-images in any model (base_multi_image + product_multi_image), so I close this. You can add features to base_multi_image, and all the modules that use it will benefit from it. |
Hi, I'm finishing the migration product_images to 8.0, so I put this issue for anyone looking for this module or that wants to start a new task, don't do it.
The text was updated successfully, but these errors were encountered: