From fc0b95fc75942c1b9e334a9b918e992a28d834e1 Mon Sep 17 00:00:00 2001 From: mohith2883 <88938356+mohith2883@users.noreply.github.com> Date: Wed, 1 Oct 2025 19:18:15 +0530 Subject: [PATCH 1/4] docs: migrate guides from v1 to v2 Starlight --- .../docs/guides/background-removal.mdx | 75 ++++++ .../docs/guides/image-optimization.mdx | 73 ++++++ .../content/docs/guides/image-overlays.mdx | 121 ++++++++++ .../content/docs/guides/image-underlays.mdx | 77 +++++++ .../src/content/docs/guides/placeholders.mdx | 160 +++++++++++++ .../content/docs/guides/responsive-images.mdx | 88 +++++++ .../content/docs/guides/social-media-card.mdx | 216 ++++++++++++++++++ .../src/content/docs/guides/text-overlays.mdx | 131 +++++++++++ .../guides/uploading-images-and-videos.mdx | 54 +++++ vercel.json | 40 ---- 10 files changed, 995 insertions(+), 40 deletions(-) create mode 100644 packages/docs/src/content/docs/guides/background-removal.mdx create mode 100644 packages/docs/src/content/docs/guides/image-optimization.mdx create mode 100644 packages/docs/src/content/docs/guides/image-overlays.mdx create mode 100644 packages/docs/src/content/docs/guides/image-underlays.mdx create mode 100644 packages/docs/src/content/docs/guides/placeholders.mdx create mode 100644 packages/docs/src/content/docs/guides/responsive-images.mdx create mode 100644 packages/docs/src/content/docs/guides/social-media-card.mdx create mode 100644 packages/docs/src/content/docs/guides/text-overlays.mdx create mode 100644 packages/docs/src/content/docs/guides/uploading-images-and-videos.mdx diff --git a/packages/docs/src/content/docs/guides/background-removal.mdx b/packages/docs/src/content/docs/guides/background-removal.mdx new file mode 100644 index 00000000..0651f44b --- /dev/null +++ b/packages/docs/src/content/docs/guides/background-removal.mdx @@ -0,0 +1,75 @@ +--- +title: Guides/Background Removal +order: 1 +--- + + + +# Removing a Background from an Image + +The CldImage component allows you to easily remove backgrounds from images using the `removeBackground` prop. + + + Removing backgrounds require enabling the Cloudinary AI Background Removal Add-On which includes a free tier for getting started. + + +## Example + +
+ +
+ + + + +```svelte + + + +``` + + + + +```html + +``` + + + + +## Learn More + +- [CldImage](/cldimage/usage) +- [getCldImageUrl](/getcldimageurl/usage) \ No newline at end of file diff --git a/packages/docs/src/content/docs/guides/image-optimization.mdx b/packages/docs/src/content/docs/guides/image-optimization.mdx new file mode 100644 index 00000000..e8c341e8 --- /dev/null +++ b/packages/docs/src/content/docs/guides/image-optimization.mdx @@ -0,0 +1,73 @@ +--- +title: Guides/Image Optimization +order: 2 +--- + + + +# Optimizing Images in Svelte/SvelteKit + +Automatically optimize images using the CldImage component. By default, CldImage opts you in to automatic optimization including delivering the most optimal format for the browser (WebP, AVIF). + +You can further optimize delivery by using [responsive sizing](/guides/responsive-images) by using the `sizes` prop. + +## Example + +
+ +
+ + + + +```svelte + + + +``` + + + + +```svelte + +``` + + + + +## Watch & Learn + +