Jump to content

Mats
 Share

Recommended Posts

BETA: SplashAndGrab

https://github.com/madebymats/InputfieldSplashAndGrab

This module attaches a search input to selected image fields that lets you search and download images from Unsplash.
(Unsplash is a stock photo service where you can download images for free and use as you wish. No strings attached.)   
You can search by string, colors, orientation/crop and order by relevance or time published

I find Unsplash useful both for placeholder images when building sites but also as a time saver for editors if they don’t have any images at hand, just search, download and publish.

splashandgrab.thumb.jpg.c9ffce8944a65d35ffe1e53fe081209f.jpg

Thanks to @apeisa for building the  FlickrInputField Module and @Robin S for AddImageUrls,  took a lot ideas and code from those modules.

Edited by Mats
Added @'s and image
  • Like 16
Link to comment
Share on other sites

Cool - i was building this, but i got stuck on the Unsplah api which was telling me they didn't like downloads and wanted to only allow usage that would use the source image from them, and this wouldn't work with an images inputfield, or imagesizer engine, or any other image manipulation like srcsets etc; So i gave up... Looks like somehow you solved all of this, so thanks!  Does this use a fixed api key, or will that api key need to be configurable at some point?

 

  • Like 1
Link to comment
Share on other sites

1 hour ago, bernhard said:

= I have not thought about that, but it's a good idea and easy to implement.
= I have not thought about that and I'm not willing to add any other services.

= I have not thought about that and I don't  know how o add any other service.  ? 

2 hours ago, Macrura said:

Does this use a fixed api key, or will that api key need to be configurable at some point?

This uses a fixed api key. 

 

  • Like 2
Link to comment
Share on other sites

  • 5 weeks later...

Hi @Mats

thank you for this module!

I noticed an issue when trying to crop images which where downloaded via this module on saving. The error said that the image could not be found.

I assume this has to do with the page file name, which has a "." in its name, which seems to be a problem.

I replaced the renaming with following line, which solves this problem for me. Maybe it's helpful for someone else coming accross this.

$pagefile->rename(str_replace('.', '-', $pagefile) . ".jpg");

 

  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...

I have noticed that on pages where an image field with this feature is activated, I get a warning that the page is being edited in another window that is generally off by a few minutes. I was not seeing this issue at all prior to adding the module. The page saves without issue, but immediately after saving the warning will pop up sometimes.

Irrelevant.

But here's something that's not - unsplash is charging now for their API. Can you include a place to include licensing on the backend for folks who still want to use them?

Edited by gornycreative
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...