Fix corrupted images in movies.json#27
Fix corrupted images in movies.json#27aleksandra-sturova wants to merge 2 commits intoVarvaraZadnepriak:masterfrom
Conversation
|
@aleksandra-sturova what do you think if we try to use EPAM Sharepoint for storing the images? |
|
@Antontelesh Also, I've trie with one image and it looks like this which doesn't seem to be expectable. So finally, tried with this service https://imagekit.io/ The image available by this url: Whole library available here (requires credentials): The free plan is described here https://imagekit.io/plans/ Sound like should be fine. |
The link won't open for me. Otherwise I'm fine with going with |
|
@Antontelesh The following url should be used for a poster: The wrong one I've shared with you is from previous uploading which added "suffix" at the end after dash "_". So, it's no longer valid. I've also updated PR description last week which contains correct links and other info about this DB. |
|
@VarvaraZadnepriak I guess this can be merged unless you have any objections |


Solution
From the initial JSON only about 500 images were valid. These were downloaded and saved.
After that iterated over the movies with broken images and requested new poster url from the movie db.
The new poster was downloaded and image name was replaced in the initial JSON.
Two movies had to be replaced:
The images zip can be loaded in EPAM cloud (attached link in a ticket in Teams).
Results
All the images were downloaded to the free cloud - see example here
https://pbqhlcnslsqajbeuwqil.supabase.co/storage/v1/object/public/images/mrw9NShY6I2FgXwk8Ge437pn08N.jpg
https://pbqhlcnslsqajbeuwqil.supabase.co/storage/v1/object/public/images/rK7m2Ba0ieXa37NaAmrx4dfRvvM.jpg
The images are working from Belarus.
Overall there’re now 3000 working images for the movies.
Supabase issue (resolution below)
The pricing here.
Basically, if the images are not requested for 7 days, but it's possible to restart the project.
However, this adds dependency on the owner of the base.
Some details also mentioned here:
https://www.reddit.com/r/Supabase/comments/v7j5ku/what_does_paused_mean/
https://supabase.com/docs/guides/platform/going-into-prod#availability
Nest step - discuss this with an owner of the React Mentoring Program.
Image kit 💚
Eventually, image kit was used for storing the images.
The images available by this url:
Whole library available here (requires credentials - shared with @Antontelesh):
The free plan is described here https://imagekit.io/plans/
Diff issue
Unfortunately, the JSON had a bit strange spacing (2 spaces and then 6 on the next line). So, had to adjust the spacing in json to be 2 and 4 on the next line.
That’s why the diff is not perfect, however, the order of elements stays the same and only the
poster_pathwas replaced (sometimes just origin, sometimes whole url) along with 2 movies.The diff in github is collapsed because it's way too big, but here's an example from local machine: