Skip to content

Latest commit

 

History

History
63 lines (46 loc) · 2.76 KB

README.md

File metadata and controls

63 lines (46 loc) · 2.76 KB

Cosmic Media

Search millions of high-quality, royalty-free stock photos, videos, images, and vectors from one convenient interface. Includes popular online media services: Unsplash, Pexels, Giphy, and Pixabay as well as OpenAI image generation from prompt. Try it here.

cosmic-media cosmic-media

How to use it

You can use Cosmic Media to search and download media manually, or you can install it in your Cosmic project as an extension to save media directly in your project.

How to install in Cosmic

  1. Log in to Cosmic.
  2. Go to Project > Extensions.
  3. Find this extension and click "Install".

Service keys

The deployed app uses default API keys for Unsplash, Giphy, Pexels, Pixaby, and OpenAI. If you run into API rate-limit issues, you can update these to your own keys:

  1. unsplash_key Register for a key here.
  2. pexels_key Register for a key here.
  3. pixabay_key Register for a key here
  4. openai_key Register for a key here
  5. giphy_key Register for a key here

Using service keys

Keys can be provided to the app in one of the following ways:

  1. As query params in the URL. For example: ?unsplash_key=YOUR_UNSPLASH_KEY&pexels_key=YOUR_PEXELS_KEY
  2. Using the .env file. See the .env.example file for env var format.
  3. If installed in Cosmic as an extension, go to Cosmic Media extension settings page by going to Extensions > Cosmic Media > Settings, find the Query Parameters section and update the following query params to your own keys:
query-params

Run locally

git clone https://github.com/cosmicjs/cosmic-media-extension
cd cosmic-media-extension
yarn
yarn dev

Built with

  • shadcn/ui
  • Next.js 13 App Directory
  • Radix UI Primitives
  • Tailwind CSS
  • Icons from Lucide
  • Dark mode with next-themes
  • Tailwind CSS class sorting, merging and linting.

License

Licensed under the MIT license.