我可以使用什么库在我的网络应用程序中从 Google 选择图像?
我正在创建一个网络应用程序,其中一部分要求人们将“经验”添加到列表中。这些可能包括吃的食物、要去的地方、要看的景点等。我希望人们能够将自己的活动添加到列表中,并拥有与之相关的图像。
我发现,当人们必须从网络上找到自己的图像,下载它,然后将其上传到另一个网站时,这太费力了,他们不会这样做。因此,我认为人们应该能够在我的应用程序中从 Google 搜索中选择图像,然后选择该图像,然后应用程序将其用作该“体验”的图像。我知道这可以使用 Google 搜索 API 来完成,并且您只能指定公共领域图像,因此使用 Google 的图像不会产生任何法律后果。
我想这对网站来说是很常见的事情。我以为我能够找到一个 Javascript 库,它可以在页面顶部启动一个灯箱并允许搜索和选择图像,但我似乎找不到。有谁知道这样的图书馆或类似的图书馆吗?
或者,有人已经看到了解决这个问题的一些明显的方法吗?有什么好方法可以避免网站的“上传图像”过程,但仍然拥有图像丰富的内容?我确信我在这里忽略了一些明显的东西。
谢谢!
I am creating a web app, part of which requires people add "experiences" to a list. These might include foods to eat, places to go, sights to see, etc. I want people to be able to add their own event to a list and have an image associated with them.
I find that when people have to locate their own image from the web, download it, and then upload it to another site, it's too much effort and they won't do it. Therefore I think people should be able to choose an image from a Google search within my app, and select and image which the app then uses as the image for that "experience". I know this can be done using the Google search API, and you can specify only public domain images, so that there's no legal ramifications of using images from Google.
I imagine this is quite a common thing for websites to do. I thought I would be able to find a Javascript library that launches a lightbox over the top of a page and allows a search and selection of an image, but I can't seem to find one. Does anyone know of any such library, or anything similar?
Alternatively, is there some obvious way around this issue that someone has seen? What is a good way to avoid the "upload image" process for a website, but still have image-enriched content? I'm sure there's something obvious I'm overlooking here.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
现在已弃用的图像 API 是实现此目的的一个起点,但是您仍然必须实现灯箱... https://developers.google.com/image-search/v1/
使用图片搜索结果时要小心!除了(可能的)版权问题外,还要确保您获得 Google 的许可,可以针对它们执行自动请求。
The now deprecated Image API was one starting point to do it, however you still have to implement the lightbox ... https://developers.google.com/image-search/v1/
Be careful when you are looking at using the image search results! apart from (possible) copyright issues also make sure that you have permission from Google to do automated requests against them.