npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@lekoarts/flickr-loader

v1.2.6

Published

Astro content loader for Flickr

Readme

Astro Flickr loader

This package provides multiple Flickr content loaders for Astro's content layer. Most loaders correspond to a single Flickr API endpoint, however some loaders call multiple one for better results. The data returned from Flickr is normalized and cleaned up, so that each loader's response is similar and easy to work with.

Want to see an overview of all my loaders? Visit astro-loaders.lekoarts.de

npm version npm downloads license

Prerequisites

  • Astro 5 or later installed
  • A Flickr API key
    • Create an account on Flickr, go to App Garden to register an app, and copy the Key

Installation

# npm
npm install @lekoarts/flickr-loader
# yarn
yarn add @lekoarts/flickr-loader
# pnpm
pnpm install @lekoarts/flickr-loader

Usage

Import @lekoarts/flickr-loader into src/content.config.ts and define your collections. You can import various loaders that correspond to their respective Flickr API endpoints.

Important: You need to either define the Flickr API key as an environment variable (FLICKR_API_KEY) or pass it to every loader with the api_key argument.

flickrPeopleGetPhotosLoader

Return photos from the given user's photostream. Only photos visible to the calling user will be returned.

Flickr API: flickr.people.getPhotos

Required options

  • username (string)

Usage

import { flickrPeopleGetPhotosLoader } from '@lekoarts/flickr-loader'

const peopleGetPhotos = defineCollection({
  loader: flickrPeopleGetPhotosLoader({
    username: 'flickr-username',
  }),
})

flickrPhotosetsGetListLoader

Returns the photosets belonging to the specified user.

Flickr API: flickr.photosets.getList

Required options

  • username (string)

Usage

import { flickrPhotosetsGetListLoader } from '@lekoarts/flickr-loader'

const photosetsGetList = defineCollection({
  loader: flickrPhotosetsGetListLoader({
    username: 'flickr-username',
  }),
})

flickrPhotosetsGetPhotosLoader

Get the list of photos in a photoset.

Flickr API: flickr.photosets.getPhotos

Required options

  • username (string)
  • photoset_id (string)

Usage

import { flickrPhotosetsGetPhotosLoader } from '@lekoarts/flickr-loader'

const photosetsGetPhotos = defineCollection({
  loader: flickrPhotosetsGetPhotosLoader({
    username: 'flickr-username',
    photoset_id: '72177720313250218',
  }),
})

flickrPhotosetsGetListWithPhotosLoader

This loader combines the flickrPhotosetsGetListLoader() and flickrPhotosetsGetPhotosLoader() loaders to get the most out of photosets. You'll get back the photosets and their list of photos.

Flickr API: flickr.photosets.getList + flickr.photosets.getPhotos

Required options

  • username (string)

Optional options

  • in (string[]) - Array of photoset IDs to match against
  • nin (string[]) - Array of photoset IDs to exclude

Usage

Fetching all photosets a user has.

import { flickrPhotosetsGetListWithPhotosLoader } from '@lekoarts/flickr-loader'

const photosetsGetListWithPhotos = defineCollection({
  loader: flickrPhotosetsGetListWithPhotosLoader({
    username: 'flickr-username',
  }),
})

Only fetching the photosets 123 and 456.

import { flickrPhotosetsGetListWithPhotosLoader } from '@lekoarts/flickr-loader'

const photosetsGetListWithPhotos = defineCollection({
  loader: flickrPhotosetsGetListWithPhotosLoader({
    username: 'flickr-username',
    in: ['123', '456'],
  }),
})

Excluding the photosets 789 and 001.

import { flickrPhotosetsGetListWithPhotosLoader } from '@lekoarts/flickr-loader'

const photosetsGetListWithPhotos = defineCollection({
  loader: flickrPhotosetsGetListWithPhotosLoader({
    username: 'flickr-username',
    nin: ['789', '001'],
  }),
})