-
Notifications
You must be signed in to change notification settings - Fork 0
get dev images optimized from cloudinary #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -3,6 +3,7 @@ | |||
.DS_Store | |||
.AppleDouble | |||
.LSOverride | |||
.idea |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this line
src: string, | ||
alt: string, | ||
width: number, | ||
height: number, | ||
quality?: { | ||
type: string, | ||
default: 'q_auto:best', | ||
}, | ||
crop?: { | ||
type: string, | ||
default: 'c_fit', | ||
}, | ||
faceRecognition?: { | ||
type: boolean, | ||
default: false, | ||
}, | ||
loading?: 'lazy' | 'eager', | ||
className?: { | ||
type: string, | ||
default: '', | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commas
}, | ||
}>() | ||
|
||
const cloudinaryUrl = 'https://res.cloudinary.com/proxify-io/image/upload' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move to config file
<script setup lang="ts"> | ||
import { computed } from 'vue' | ||
|
||
const props = defineProps<{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@borna9II @29avet1 This is almost correct vue 3 syntax. If you want to add default values for the props we should use
const props = withDefaults(defineProps<{
src: string
alt: string
width: number
height: number
quality?: string
crop?: string
faceRecognition?: boolean
loading?: 'lazy' | 'eager'
class?: string
....
}>(), {
quality: 'q_auto:best',
crop: 'c_fit',
faceRecognition: false,
class: '',
....
});
I do not know it if we want to update this and also if PR to Vue is published.
Description of Problem
jpg images load longer
Proposed Solution
get size-optimized images from cloudinary storage in webp format
Additional Information