Skip to content

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

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

29avet1
Copy link
Collaborator

@29avet1 29avet1 commented Aug 26, 2024

Description of Problem

jpg images load longer

Proposed Solution

get size-optimized images from cloudinary storage in webp format

Additional Information

@29avet1 29avet1 self-assigned this Aug 26, 2024
@29avet1 29avet1 merged commit 372bdf2 into feat/add-new-talent-page Aug 26, 2024
@29avet1 29avet1 deleted the feat/dev-img-optimizations branch August 26, 2024 10:55
@@ -3,6 +3,7 @@
.DS_Store
.AppleDouble
.LSOverride
.idea

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this line

Comment on lines +5 to +25
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: '',
},

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'

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<{
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants