odoo / odoo

Odoo. Open Source Apps To Grow Your Business.
https://www.odoo.com
Other
38.61k stars 25.02k forks source link

product's main image can't be reused in web_editor, thus it slow down the website #61621

Open zeroheure opened 3 years ago

zeroheure commented 3 years ago

Impacted versions: all

Steps to reproduce: Upload an image as a product's main image. Then try to reuse it on a web page in the web_editor. Or upload an image on one of your website webpage (possibly the product's web page) and try to reuse it as a product's main image.

Current behavior: Product's images can't be found in the web_editor image list (and vice versa), if we try to call it from its URL the image is duplicated. Resulting on double downloading for the same image. Very annoying when writing blog post on some of your products, visitor will be slow-downed.

Expected behavior: all images shared in tfhe same database.

pedrobaeza commented 3 years ago

I don't really see this as an improvement, as showing all possible images from all models will confuse more than adding value to the web editor, and as images can be cached by browsers, there's no really too much difference in this.

I let others to decide if this should be improved or not.

zeroheure commented 3 years ago

Well Google disagree ;-) Web pages speed became one of the highest criteria for Goggle some months ago. Google analytics provide special tests and advices on this. Every Kb gain is important.

I have real cases were products images should be reused.

pedrobaeza commented 3 years ago

Yes, but that's not this problem of "duplicity". It's more the image size.

zeroheure commented 3 years ago

Duplicated images result of double downloading, increasing web page size and slowing page speed. For example see this product page from my wife's website where all product variants images should be reused to compose the image at the bottom. (Agree this is not the best use case, I can find blog post too).

pedrobaeza commented 3 years ago

That are very residual cases. Images are not double in any web page. Blog post is a different page from shop one.

zeroheure commented 3 years ago

You can't take web pages separately : when you write a landing page or a blog post on some products or promote them on your home page, you want potential visitors to load the corresponding shop product page as fast as possible, because they don't want to wait (Amazon study). Problem is even more accurate now that visitors comes firstly from mobile phones (Google study) where bandwith is lower than on desktop.

Please, understand that promoting products on landing pages and blog is very common in ecommerce.

pedrobaeza commented 3 years ago

As said, I don't see such a big problem, but I let others to give their opinion.

Yenthe666 commented 3 years ago

I don't see a huge issue here either but the final call should be to @JKE-be :)

rdeodoo commented 3 years ago

Maybe we could have a special tab in the image dialog that shows model images, separately from the web page ones. In that tab (or whatever it is), one could find its product images, or its blog post images etc.

@zeroheure example here doesn't seems absurd at all. For that specific case, maybe we could just add the current page/product images to the image dialog.

Anyway, it might just be overkill. Let's see what @JKE-be and @sbuhl think here so we can close this one or open a task if needed.

zeroheure commented 3 years ago

Thanks.

JKE-be commented 3 years ago

I understand the idea...

https://www.chez-les-enfants.fr/shop/product/boite-a-dents-de-lait-en-bois-souris-6-couleurs-849 is a wrong example since the product image is not duplicated in description ;)

In the past it works as you ask and it was the Apocalypse because we have too much image: forum, mail.message, share icon... So we probably need to filter on some model like slide, blog, product, ... But in this case we really need to improve search, because you will probably never find your pictures of product because name is wrong. So the search need to make a name search on all (specified) models, and find image linked to this records + find by name imo

As explain by @rdeodoo it should be probably a new checkbox / tab to enable to avoid to noise the current uX...

Lets see the @sbuhl's opinion, our product owner.

zeroheure commented 3 years ago

https://www.chez-les-enfants.fr/shop/product/boite-a-dents-de-lait-en-bois-souris-6-couleurs-849 is a wrong example since the product image is not duplicated in description ;)

Yes, but it should be :-)

A better use case would be blog post or landing pages, where we need to redirect visitors to products. If the product image is already loaded on the blog post or the landing page, the product page will display a lot faster (specialy on mobile).

There is also the special case of blog post writing by someone outside of the office (or writing on mobile) without access to our image product library stored on disk. This often happen with Covid these days.

zeroheure commented 3 years ago

Here's another sample https://www.chez-les-enfants.fr/shop/product/bj361-plateau-de-fromages-en-bois-545