Open inclinedadarsh opened 11 months ago
Can be solved by modifying this line appropriately.
@dubeyanant I believe it needs more work than this.
Actually the link that the app accepts is image link. Basically the address of the very image on Unsplash/Pexel's server. But when someone shares the link from Unsplash, it doesn't provide the image's address, rather provides link of the page where the image is displayed along with Author's name and stuff.
So adding that link will simply not show the image as it's not the address of the server.
I believe the work needed is after adding the Unsplash link, the website itself somehow grabs that image's address and uses that.
The possible solution I speculate is use something like an edge function (something like in vercel's edge function or aws lambda functions) and then each time a banner is added, a request is sent to that function, the function grabs the image address by web scraping (idk about legality).
The other possible solution is to use Unsplash's Dev API. If you want, I can search more about it and post you on how to do that.
I have no idea about Pexel.
Amazing vision. The problem is exactly as you describe, and it also occurs with Pexels. There is a distinction between the page address and the picture address, and even if regex allows you to enter the page address, it cannot yet load the actual image.
Difference:
Because I don't want to be bothered by edge functions, I might look into how to integrate Unsplash instead of supplying the image address.
Describe the bug Ideally one should be able to use link after sharing an image from Unsplash, rather it's not accepting such links. It's accepting links that are copied using the "Copy image address"
To Reproduce
Screenshots
Check one