3 ms·
I don't understand why Amazon has to make image cropping/resizing thing on fly. Good image resizing algorithm(cubic/seam curving) is time consuming. Even good a
by liuliu 17y ago
I don't understand why Amazon has to make image cropping/resizing thing on fly. Good image resizing algorithm(cubic/seam curving) is time consuming. Even good algorithms(poisson?) for image modification(add logo) is computational expensive. Just don't get the logic why storing image is expensive than computing one.
- yan 17y ago"efficiency" is a vector, not a scalar. I think rolling out deals, new products, and promotions is made a lot cleaner by having that be generative. There's definitely a lot of value to having images assigned to products and not to products+transient properties like discounts.
- erydo 17y agoI'm sure their servers are caching the images after generation (or perhaps after 'n' requests or some other optimization in that vein). Just because the URL describes the operations performed on the image doesn't necessarily mean they always cause those operations to be performed each request.
- dangoldin 17y agoI imagine that because they have such a large volume of images and different combinations (20% off in one country, 30% off in another, ..) it makes sense for them to create images only when requested. They probably cache the generated images though. In addition, I think that any given day a small percentage of Amazon's products are viewed so it may not make sense to generate an image for every possible combination. They may also have a longer term view and plan on using this graphic manipulation in another product.
- tlrobinson 17y agoSurely they cache the results? It seems pretty smart to me. Rather than having some external process that tries to figure out every permutation of image that might be necessary they just have a simple HTTP API that always gives you exactly the image you need. As long as they're caching the image after the first request I don't see any problem.
- coliveira 17y agoThe issue is that generating all possible images would tie a lot more resources than generating them on the fly -- only for the combinations that are requested. Also, caching will help if the image is requested multiple times.
- coliveira 17y agoA meta-comment here: why down vote someone that is asking a legitimate question?