# album-slideshow

> Album Slideshow.

Latest version **0.0.2** (published 2021-02-26) · Apache-2.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install album-slideshow
pnpm add album-slideshow
yarn add album-slideshow
bun add album-slideshow
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2021-02-26 |
| First published | 2021-02-26 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 88.4 KB |
| Known vulnerabilities | 0 (+4 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 436 |
| Author | Daniel Andrade |
| Maintainers | balena.io |
| Keywords | webserver, nodejs, expressjs |

## Links

- npm: https://www.npmjs.com/package/album-slideshow
- Repository: https://github.com/balena-io-projects/balena-dash
- Homepage: https://github.com/balena-io-projects/balena-dash#readme
- Issues: https://github.com/balena-io-projects/balena-dash/issues
- npm.io page: https://npm.io/package/album-slideshow

## Dependencies (8)

- [ejs](https://npm.io/package/ejs.md) *
- [cors](https://npm.io/package/cors.md) ^2.8.5
- [sharp](https://npm.io/package/sharp.md) 0.22.1
- [express](https://npm.io/package/express.md) *
- [request](https://npm.io/package/request.md) ^2.88.0
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) ^4.2.0
- [node-schedule](https://npm.io/package/node-schedule.md) 1.3.2
- [request-promise-native](https://npm.io/package/request-promise-native.md) ^1.0.3

## Recent versions

- 0.0.2 (latest) — 2021-02-26

## README

# balenablocks/photo-gallery

A blocks that allows you to display a photo slideshow on a webpage over a web server. Out of the box you can use Google Photo Albums, Dropbox Photo Album and Apple Photos. The images are downloaded automatically and auto updated in case of changes.

## Supported Albums

### Google Photos Albums

Go to [https://photos.google.com](https://photos.google.com) and select the album that you want to share.

Click in the share button, click in the `Create link` button and copy the the url.

### Dropbox Photo Albums

On the [dropbox](https://www.dropbox.com/home) website, go to the folder that contains the photos and click on `Share Folder` and then `Copy link`. This will the URL you will need to add to balenaCloud.

### Apple iCloud Photo Album

Create a photo album and copy the share url, similar to `https://www.icloud.com/sharedalbum/#ALBUM-ID`

### USB drive Photo Album

Place your photos on a USB stick and plug it into the Raspberry Pi. Each time all previous existing photos will be removed and replaced by the new ones.

- Set `GALLERY_URL` to `USBDRIVE` to use this mode.
- Make sure to update `CRON_SCHEDULE` accordingly or else image changes will only be picked up at reboot.

## Usage

`docker-compose.yml`

```yml
version: "2.1"
services:
  photos:
    privileged: true
    restart: always
    image: balenablocks/photo-gallery:<arch>
    ports:
      - "8888"
```

e.g For running on Raspberry Pi 3B+ which is `armv7hf` use `image:balenablocks/photo-gallery:armv7hf`

You can also set your `docker-compose.yml` to build a `Dockerfile.template` file, and use the build variable `%%BALENA_ARCH%%` so that the correct image is automatically built for your device.

`docker-compose.yml`

```yml
version: "2.1"
services:
  photos:
    privileged: true
    restart: always
    build: ./
    ports:
      - "8888"
```

`Dockerfile.template`

```dockerfile
FROM balenablocks/photo-gallery:%%BALENA_ARCH%%
```

### Supported Architectures

- `armv7hf`
- `rpi`
- `aarch64`
- `amd64`

## Setting up the photo album

- On balenaCloud, go to **Device variables D(x)** and add the following:

| ENV VAR                 | Description                                                                                        | Options                                     | Default        |
| ----------------------- | -------------------------------------------------------------------------------------------------- | ------------------------------------------- | -------------- |
| PORT                    | Web server port.                                                                                   |                                             | 8888           |
| GALLERY_URL             | Gallery URL for **google photos**, **dropbox images**, **apple photos** or **usb drive**.          |                                             |                |
| GALLERY_SLIDESHOW_DELAY | Slideshow delay in milliseconds                                                                    |                                             | 10000          |
| GALLERY_IMAGE_STYLE     | `Contain` shows the entire image on the screen. `Cover` zooms the image filling the entire screen. | contain, cover                              | cover          |
| GALLERY_EFFECT          | Transition effects                                                                                 | fade, horizontal, vertical, kenburns, false | fade           |
| CRON_SCHEDULE           | Cron scheduler to reload images to get changes                                                     |                                             | 0 */12 * * * |
| SHUFFLE_SLIDESHOW       | Shiffle images to display randomly                                                                 | true, false                                 | false          |
| RESIZE_WIDTH            | \* Resize image width or height (larger side) in pixels                                            |                                             | 1000px         |
| COMPRESS_QUALITY        | \* Image compression                                                                               | 0 - 100                                     | 90             |

    * Only available for iCloud photos

Note that after some performance tests on the Raspberry Pi 2 & 3, the combination of `GALLERY_IMAGE_STYLE = contain` and `GALLERY_EFFECT = fade or kenburns` can make the transition effects choppy.

---
_Source: https://npm.io/package/album-slideshow · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
