Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace via.placeholder.com images with picsum.photos images #210

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

viemmsakh
Copy link

@viemmsakh viemmsakh commented Jan 29, 2025

via.placeholder.com was purchased by a warehouse company and as a result all image URLs in data.json are invalid. This PR replaced the image URLs in data.json with valid image URLs from picsum.photos.

Additional Details:

Image IDs on picsum.photos are not sequential and therefore the image IDs used are not sequential. A script was wrote to parse the v2/list endpoint provided by picsum so that only valid IDs were used in this PR.

There are only about 995 unique image IDs on picsum; so there are only 995 unique image URLs in this PR change. Since there are 5000 images in the data.json I decided to loop though the 995 unique IDs while replacing the image URLs. As a result some picsum images are repeated. For example, the first image with id 0 shows up 6 times.

I opened an issue on the picsum source repo asking for permission to use their service in this project.

Permission was granted along with a suggestion for using the seed generated images instead of hard coding image IDs. PR updated to use the recommended seed generation instead of hard coded IDs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant