https://github.com/twicpics/components-demo-vue2
Demonstration of TwicPics components in a Vue2 project.
https://github.com/twicpics/components-demo-vue2
Last synced: about 2 months ago
JSON representation
Demonstration of TwicPics components in a Vue2 project.
- Host: GitHub
- URL: https://github.com/twicpics/components-demo-vue2
- Owner: TwicPics
- License: mit
- Created: 2022-12-16T18:44:57.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-11T11:28:45.000Z (3 months ago)
- Last Synced: 2025-02-11T12:32:05.166Z (3 months ago)
- Language: Vue
- Size: 202 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TwicPics Components + Vue2
This project is a demonstration project of [TwicPics Components](https://www.twicpics.com/docs/components/vue-2?utm_source=github&utm_medium=organic&utm_campaign=components) using [Vue 2](https://v2.vuejs.org/).
## How to build
### Using npm
```bash
# install dependencies
$ npm install# serve with hot reload at localhost:3000
$ npm run serve# build for production
$ npm run build
```### Using yarn
```bash
# install dependencies
$ yarn install# serve with hot reload at localhost:3000
$ yarn dev# build for production
$ yarn build
```## Overview
### What is [TwicPics](https://www.twicpics.com/?utm_source=github&utm_medium=organic&utm_campaign=components)?
[TwicPics](https://www.twicpics.com/?utm_source=github&utm_medium=organic&utm_campaign=components) is a **Responsive Image Service Solution** (SaaS) that enables **on-demand responsive image generation**.
With [TwicPics](https://www.twicpics.com/?utm_source=github&utm_medium=organic&utm_campaign=components), developers only deal with high-resolution versions of their media while end-users receive **optimized, perfectly sized, device-adapted** versions **delivered from a server close to them**.
[TwicPics](https://www.twicpics.com/?utm_source=github&utm_medium=organic&utm_campaign=components) acts as an **image proxy**. It requests your master image, be it on your own web server, cloud storage or DAM, then generates a **device-adapted** version with **best-in-class compression**, delivered directly to the end-user from the **closest delivery point** available.
### What is TwicPics Components?
TwicPics Components is a **collection of web components** that make it dead easy to unleash the power of [TwicPics](https://www.twicpics.com/?utm_source=github&utm_medium=organic&utm_campaign=components) in your own projects.
Basically, TwicPics components replace `img` and `video` tags. They greatly and transparently optimize your CLS by providing LQIP (Low-Quality Image Placeholders) and Lazy Loading out of the box.
Simply replace this:
```html
![]()
```With this:
```html
```
Thanks to the open source [TwicPics](https://www.twicpics.com/?utm_source=github&utm_medium=organic&utm_campaign=components) Components, delivering responsive images in your [Vue 2](https://v2.vuejs.org/) projects has never been easier.
## TwicPics configuration
### Requirement
The only requirement is to have a TwicPics account.
If you don't already have one, you can easily [create your own TwicPics account for free](https://account.twicpics.com/signup).### Configuring `@twicpics/components`
TwicPics components for `Vue2` comes as an `Vue2 Plugin` and is configured as [such](https://v2.vuejs.org/v2/guide/plugins.html#Using-a-Plugin).
An example of configuration is set within `main.js` file.
All you have to do is set your configuration options to the desired values ([see documentation](https://www.twicpics.com/docs/components/vue-2?utm_source=github&utm_medium=organic&utm_campaign=components#setup-options)).
## Examples
All the examples proposed in this project are located in the `components` directory.
Feel free to inspire yourself from these different use cases to unleash the power of [TwicPics](https://www.twicpics.com/) in your own projects.## Questions and feedback
Fell free to submit an [issue](https://github.com/TwicPics/components/issues) or to ask us anything by dropping an email at [[email protected]](mailto:[email protected]).
## Licence
[![License][license-image]][license-url]
[license-image]: https://img.shields.io/npm/l/@twicpics/components.svg?style=flat-square
[license-url]: https://raw.githubusercontent.com/twicpics/components/master/LICENSE