Aliexpress True API

FREEMIUM
(Ким) georgekhananaev | Оновлено a month ago | Commerce
Популярність

9.4 / 10

Затримки

2,838ms

Рівень обслуговування

100%

Health Check

100%

Повернутися до всіх обговорень

Unable to display returned images on my app

Rapid account: Abdullah Ahmad AAK
AbdullahAhmadAAK
3 months ago

Your API returns main image URL as https://ae01.alicdn.com/kf/Ae8e4eac2de3e43c5bdff1685b3b54121J.jpg.

When I open it in browser it opens perfectly fine. But when I try to display it in my app, it won’t show at all. I’m trying the below 2 ways. Is there a restriction on the images for not being displayable on other apps?

<img src=“ae01.alicdn.com/kf/S176164acec614d87899311cc3227bff10.jpg” alt="{product.name}">

<img src=“https://ae01.alicdn.com/kf/S176164acec614d87899311cc3227bff10.jpg” alt="{product.name}">

Rapid account: Georgekhananaev
georgekhananaev Commented 3 months ago

I’ve developed compress, resize, caching image server, built on an EPYC AMD SERVER with 6 cores. This server efficiently compresses and serves images, ensuring smooth access. It’s designed to cache AliExpress images for up to 6 months. Even if AliExpress experiences disruptions, your customers will still have access to the images. Sign up here for access: https://rapidapi.com/georgekhananaev/api/real-time-image-transform-api

Rapid account: Georgekhananaev
georgekhananaev Commented 3 months ago

Hi there,

Possibly the problem:
Cross-Origin Resource Sharing (CORS) Policy: Web browsers implement a security feature called the Same-Origin Policy, which restricts web pages from requesting resources from a different domain than the one serving the web page. This is to prevent malicious websites from reading sensitive information from other sites. If you’re trying to display an image from another domain in your app and the server doesn’t include the appropriate CORS headers allowing your domain to access the resource, the browser will block it. Directly opening an image URL in a browser doesn’t face this restriction, which is why it works when you try it that way.

Solutions (2 Options):

  1. Host these images on your own backend server and serve them to your customers.
  2. Utilize a caching service such as Thumbor or similar services.

Other possible issue:
Incorrect Quotation Marks: Ensure your code uses the correct quotation marks.

Regarding solution 2
One approach I could take is to establish my own cached Thumbor server to serve all AliExpress images from my own server. However, this would be a costly operation, necessitating the use of a non-ARM server since Thumbor currently lacks support for it. Additionally, hosting and serving millions of images would consume a significant amount of bandwidth. As a solution, I could introduce an alternative paid subscription plan if necessary. On the bright side, this setup would allow you to upload your own watermarks, and I would host it behind CloudFlare, avoiding the use of AliExpress’s Chinese CDN.

Should you require this as a service, please do not hesitate to inform me.

Rapid account: Mhisham 3973
mhisham3973 Commented 3 months ago

same issue

Приєднуйтесь до обговорення — додайте повідомлення нижче:

Вхід / Реєстрація, щоб публікувати нові повідомлення