Skip to content

Commit

Permalink
Add link and readme for IO
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanlee85 committed Oct 26, 2023
1 parent 80e3c69 commit 98aa47e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
24 changes: 24 additions & 0 deletions examples/v7-image-optimization/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Edgio Image Optimization Examples

https://edgio-community-examples-v7-image-optimization-live.glb.edgio.link

## Description

Edgio's [image optimization](https://docs.edg.io/guides/v7/performance/image_optimization) feature can dynamically alter images to fit a site's design, experience, and performance needs, by applying transformations like resizing, blurring, or cropping based on the site's requirements. For instance, it can blur images beyond a visitor's free access limit on a paywalled site. It enhances performance by caching the transformed images at the network edge, reducing image processing time and delivering optimized images nearer to users.

## Setup and Installation

- Clone the repository to your local machine.
- Run `npm install` in the repository directory.

## Getting Started

After setting up the project, run `npm run edgio:dev` to start a local development server to test the example functions.

To deploy the project to Edgio, use the command `npm run edgio:deploy`. Note that deployment to Edgio requires you to be
logged into Edgio CLI which can be done via `npm run edgio login` and following the instructions.

## Support

If you have any queries or face issues with this project, please don't hesitate to contact
the [Edgio team](https://edg.io/contact-support/).
6 changes: 5 additions & 1 deletion examples/v7-image-optimization/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import { Router, edgioRoutes } from '@edgio/core';

export default new Router()
.use(edgioRoutes)

.always({
caching: {
max_age: '1d',
},
})
// example page for image optimization
.match('/', {
edge_function: 'edge-functions/main.js',
Expand Down

0 comments on commit 98aa47e

Please sign in to comment.