{"id":18665205,"url":"https://github.com/imgeng/imageengine-vue3","last_synced_at":"2025-04-11T22:30:56.607Z","repository":{"id":140866962,"uuid":"595992735","full_name":"imgeng/imageengine-vue3","owner":"imgeng","description":"ImageEngine vue3 module","archived":false,"fork":false,"pushed_at":"2024-12-14T00:35:06.000Z","size":400,"stargazers_count":0,"open_issues_count":13,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-01T10:03:41.937Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imgeng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-01T08:33:30.000Z","updated_at":"2024-11-13T05:52:48.000Z","dependencies_parsed_at":"2023-11-25T10:24:18.286Z","dependency_job_id":"a1c4433c-18fc-4f4f-bb85-fe30023b3dc7","html_url":"https://github.com/imgeng/imageengine-vue3","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgeng%2Fimageengine-vue3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgeng%2Fimageengine-vue3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgeng%2Fimageengine-vue3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgeng%2Fimageengine-vue3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imgeng","download_url":"https://codeload.github.com/imgeng/imageengine-vue3/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248489514,"owners_count":21112588,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T08:26:41.181Z","updated_at":"2025-04-11T22:30:55.411Z","avatar_url":"https://github.com/imgeng.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vue components for ImageEngine integration\r\n\r\nHassle-free way to deliver optimized responsive images in your Vue applications.\r\n\r\n## Quick start\r\n\r\nThe bundle includes three major components:\r\n\r\n* `\u003cImageEngineProvider\u003e`\r\n* `\u003cImage\u003e`\r\n* `\u003cSource\u003e`\r\n\r\nThe only prerequisite to start using them is placing `ImageEngineProvider` somewhere above in the DOM tree with the `deliveryAddress` prop set to your [ImageEngine Delivery Address](https://support.imageengine.io/hc/en-us/articles/360059238371-Quick-Start) :\r\n\r\n```vue\r\n \u003ctemplate\u003e\r\n  \u003cdiv class=\"content\"\u003e\r\n    \u003cImageEngineProvider deliveryAddress=\"https://blazing-fast-pics.cdn.imgeng.in\"\u003e\r\n      \u003cpicture\u003e\r\n        \u003cSourceComponent\r\n          :srcSet=\"[\r\n            {\r\n              src: `/images/pic_1_variation_1.jpg`,\r\n              width: '500w',\r\n            },\r\n            {\r\n              src: `/images/pic_1_variation_2.jpg`,\r\n              width: '900w',\r\n              directives: { compression: 0 },\r\n            },\r\n          ]\"\r\n          :attributes=\"{ media: '(max-width: 950px)' }\"/\u003e\r\n        \u003cSourceComponent\r\n          :srcSet=\"[\r\n            {\r\n              src: `/images/pic_1_variation_1.jpg`,\r\n              width: '500w',\r\n            },\r\n            {\r\n              src: `/images/pic_1_variation_2.jpg`,\r\n              width: '900w',\r\n              directives: { compression: 0 },\r\n            },\r\n          ]\"\r\n          :attributes=\"{\r\n            media: '(max-width: 950px)',\r\n            id: 'testid',\r\n            'data-test': 'test source attribute',\r\n          }\"/\u003e\r\n        \u003cImageComponent\r\n          src=\"/images/pic_2.jpg\"\r\n          :attributes=\"{\r\n            alt: 'test image',\r\n          }\"\r\n          :directives=\"{\r\n              outputFormat: 'webp',\r\n              rotate: 45,\r\n              inline: true\r\n          }\"/\u003e\r\n      \u003c/picture\u003e\r\n    \u003c/ImageEngineProvider\u003e\r\n  \u003c/div\u003e\r\n\u003c/template\u003e\r\n\r\n\u003cscript\u003e\r\nimport {Image, Source, ImageEngineProvider} from \"@imageengine/vue3\";\r\n\r\nexport default {\r\n  components: {\r\n    ImageComponent: Image,\r\n    SourceComponent: Source,\r\n    ImageEngineProvider,\r\n  },\r\n};\r\n\u003c/script\u003e\r\n\r\n```\r\n\r\n```vue\r\n \u003ctemplate\u003e\r\n  \u003cdiv id=\"app\"\u003e\r\n    \u003cImageEngineProvider deliveryAddress=\"https://blazing-fast-pics.cdn.imgeng.in\"\u003e\r\n        \u003cImageComponent src=\"/images/pic_2.jpg\" /\u003e\r\n    \u003c/ImageEngineProvider\u003e\r\n  \u003c/div\u003e\r\n\u003c/template\u003e\r\n\r\n\u003cscript\u003e\r\nimport {Image, ImageEngineProvider} from \"@imageengine/vue\";\r\n\r\nexport default {\r\n  components: {\r\n    ImageComponent: Image,\r\n    ImageEngineProvider\r\n  },\r\n};\r\n\u003c/script\u003e\r\n```\r\n\r\n[Demo app on CodeSandbox](https://codesandbox.io/p/sandbox/imageenginevue3demo-nc66jq)\r\n\r\n## Component props reference\r\n\r\n### ImageEngineProvider\r\n`deliveryAddress` - [ImageEngine Delivery Address](https://support.imageengine.io/hc/en-us/articles/360059238371-Quick-Start):\r\n\r\n```ts\r\ndeliveryAddress: string\r\n```\r\n\r\n`stripFromSrc` - Strip away a portion of a source string in all ImageEngine's components. Particularly useful if your images are coming from a headless CMS and you need to erase something in received URL path (origin, for example):\r\n\r\n```ts\r\nstripFromSrc?: string\r\n```\r\n\r\n\r\n### Image\r\n`src` - Relative path to the image:\r\n\r\n```ts\r\nsrc: string\r\n```\r\n\r\n`directives` - ImageEngine directives:\r\n\r\n```ts\r\ndirectives?: {\r\n  // Define desired width.\r\n  width?: number\r\n  // Set width to auto (with fallback).\r\n  autoWidthWithFallback?: number\r\n  // Define desired height.\r\n  height?: number\r\n  // Adjust compression.\r\n  // Possible range: 0-100.\r\n  compression?: number\r\n  // Define desired output format.\r\n  outputFormat?:\r\n    | \"png\"\r\n    | \"gif\"\r\n    | \"jpg\"\r\n    | \"bmp\"\r\n    | \"webp\"\r\n    | \"jp2\"\r\n    | \"svg\"\r\n    | \"mp4\"\r\n    | \"jxr\"\r\n    | \"avif\"\r\n    | \"jxl\"\r\n  // Define desired fit method.\r\n  fitMethod?: \"stretch\" | \"box\" | \"letterbox\" | \"cropbox\" | \"outside\"\r\n  // Don't apply any optimizations to the origin image.\r\n  noOptimization?: true\r\n  // Adjust sharpness.\r\n  // Possible range: 0-100.\r\n  sharpness?: number\r\n  // Define rotation.\r\n  // Possible range: -360 to 360.\r\n  rotate?: number\r\n  // Use WURFL to calculate screen's width and then scale the image accordingly.\r\n  // Possible range: 0-100 (float).\r\n  scaleToScreenWidth?: number\r\n  // Crop the image [width, height, left, top].\r\n  crop?: number[]\r\n  // Convert the image into a data url.\r\n  inline?: true\r\n  // Keep EXIF data.\r\n  keepMeta?: true\r\n  // Force download the image\r\n  force_download?: true\r\n  //Maximum DPR (Device Pixel Ratio) to consider when resizing an image.\r\n  max_device_pixel_ratio: 2.1;   // 1-4 float\r\n}\r\n```\r\n\r\n`srcSet` - List of image variations for the image source set:\r\n\r\n```ts\r\nsrcSet?: [{\r\n  // Relative path to the image.\r\n  src: string\r\n  // Width descriptor.\r\n  width: string\r\n  // Custom optimization instructions.\r\n  directives?: TDirectives\r\n}]\r\n```\r\n\r\n`attributes` - List of additional attributes:\r\n\r\n```ts\r\nattributes?: [{\r\n  // regular attribute\r\n  alt: string\r\n  // ...\r\n}]\r\n```\r\n\r\n\r\n### Source\r\n`srcSet` - List of image variations for the image source set:\r\n\r\n```ts\r\nsrcSet?: [{\r\n  // Relative path to the image.\r\n  src: string\r\n  // Width descriptor.\r\n  width: string\r\n  directives?: TDirectives\r\n}]\r\n```\r\n\r\n`attributes` - List of additional attributes:\r\n\r\n```ts\r\nattributes?: [{\r\n  // regular attribute, ex. media: '(max-width: 950px)',\r\n  // ...\r\n}]\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimgeng%2Fimageengine-vue3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimgeng%2Fimageengine-vue3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimgeng%2Fimageengine-vue3/lists"}