imageUrl lorempixel is down #957
Comments
Again? We could always make an additional check to source code where alternative (such as http://placehold.it/) is used if the check fails. |
On the contrary, I consider removing the image provider altogether, because I don't want to depend on a third-party with no SLA. |
I think a disclaimer to that effect would be sufficient. I still find the Though an external provider (like EmanueleMinotto/PlaceholdItProvider) |
lorempixel seem to be always down at the moment. it is useful though please don't remove it. |
How about letting the user select where the images come from rather than making the source an internal variable? I just spent an entire evening debugging some image problems, and it turns out the images had not downloaded. Maybe some feedback that the download had been unsuccessful would help...? :) -- OR -- Fetch images from Flickr's Creative Commons images? |
If you're looking for an immediate solution, I haven't run into this with FillMurray, either. It offers less flexibility, but you can replace the following function in
|
#963 fix this issue |
Or from the placeholdit provider [https://github.com/EmanueleMinotto/PlaceholdItProvider]
|
Maybe we could consider to choose in a configuration or something else like that the image provider that the user wants to have, so when one is down he can swap to another. |
What about using something like Intervention Image to make a fake image? It'd certainly be less interesting, but it'd be reliable. I'd be happy to work on a PR if @fzaninotto finds the idea passable. |
Because it adds a dependency on GD or ImageMagick. |
So I guess the question is, do you build in an image generator guaranteed to work and document its dependencies or build in one that fails silently and document that the end user's code should somehow account for that? I certainly don't have the right answer, but the shortcomings definitely need documented. Is there any data on how many people are running PHP w/o at least GD? I guess it'd be hard to tell on dev environments. |
As far as I know, PHP has internal features to build images. At least with PNG and JPEG. Not so sure with other formats though. http://php.net/manual/en/function.imagejpeg.php |
@Darival I like that idea, though the Unsplash API does require an application. Does everything get routed through one application deployed with Faker, or does that need to be configured by the end user? |
@ethanclevenger91 it does require app registration by the end user. This is better as an alternative option than as a replacement to lorempixel. |
Today https://lorempixel.com down again. I write a patch to switch to https://fakeimg.pl https://gist.github.com/sinkcup/9cb5ef3495ad602417c276b0fd78b760
|
Lorempixel seems to be down again, today. Any updates on an alternative? |
A quick Google/Packagist search will lead you to find https://github.com/bruceheller/images-generator. |
The JS version of Faker although unrelated is using https://loremflickr.com/. It seems like the best option would be to have a sane default but allow it to be configurable somehow. Many of these services have the same URL structure. |
Again, we won't fix this problem in Faker, but rather remove the Image formatter altogether. Feel free to work on a standalone formatter for loremflickr, which seems to be a more reliable source. |
Please don't remove image support from faker - images are an essential part of web development. It's as simple to just implement a random placeholder image with a solid background colour and basic text. |
if people want an alternative to lorem pixel, i made a small fix to pass a different image generator as an argument, not incredibly elegant but it works since most of the alternatives have the same formatting |
it'll be nice if you could pass the param to the baseUrl, I created a pull request about it #1542 |
Lorempixel has been down for 2 days now The package even dies silently, would be nice if it flagged the problem to the user, or allowed for multiple providers. |
@oliversarfas I created a pull request for multiple providers #1542 |
It took me 20 minutes to figure out why my image tests were returning boolean false...granted, it's a simple check but I didn't know where to start looking! +1 for throwing an error when failing to pull an image, or indeed, for getting rid of the lorem pixel dependency altogether. |
@fzaninotto So you don't want any other third party image providers nor you want to generate the image directly in PHP? Or am I mistaken? What is the goal here? |
Right. the goal is to have in Faker core only stable and non-third-party dependent formatters. You can publish and share any formatter that doesn't fit these two criterions as third-party packages. |
So in the end no solution for now right? |
You could locally create images instead, for example by using this image generator. I've created that package so I can generate images instead of using faker to download them. |
If anybody else is looking for fake profile photos, try thispersondoesnotexist.com - it's pretty great! I just downloaded 100 or so plausible-looking profile images, named them |
I relpaced it with:
|
Is there any chance to introduce a backup when http://lorempixel.com/ is down?
The text was updated successfully, but these errors were encountered: