Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Cloudinary Laravel Laravel Package

cloudinary-labs/cloudinary-laravel

Laravel integration for Cloudinary: upload, manage, and transform images and videos with an easy Facade/API, configurable storage, and URL generation. Supports signed delivery, eager transformations, and seamless use in apps and queues.

View on GitHub
Deep Wiki
Context7

title: Examples of using Cloudinary Laravel. description: Examples of using Cloudinary Laravel. ogImageTitle: Examples head:

  • tag: title content: Examples - Cludinary Laravel

import { CldImage } from "astro-cloudinary";

import CodeBlock from '@components/CodeBlock.astro'; import HeaderImage from '@components/HeaderImage.astro';

Basic Transformations

Cloudinary supports a wide variety of powerful transformations that allow you to not only deliver, but easily edit and build new images on the fly.

Background Removal

Remove Background

removeBackground: Removes the background of the image using AI

:::tip The Cloudinary AI Background Removal add-on is required to use this feature. :::

Color Background

background: Specifies a color to use as a background.

Image Background

underlay: Specifies a public ID to use as an underlaying image.

:::tip The Generative AI Background Replace feature can use AI to replace the background with an image based on a prompt, potentially resulting in better results! :::

Cropping & Resizing

Cropping

crop: Specifies the mode to use when cropping an image based on the given dimensions.

:::note By default, CldImage uses a gravity of auto, meaning the crop will automatically position the subject in the center of the resulting image. :::

Cloudinary additionally supports dynamic crop modes like thumb that may provide a different result based on the given width and height. To help provide more options for controlling cropping images, you can specify and object or array of objects.

For instance, to crop the original source image, which will then later resize it to the initial width and height, you can use:

Which will provide a consistent crop for all rendered sizes.

Learn more about cropping and responsive images.

Generative Fill

fillBackground: Fills the background of an image using Generative AI

:::tip The generative fill transformation is currently in Beta. Learn more. :::

Generative Recolor

recolor: Recolors an object in an image using Generative AI

:::tip The generative recolor transformation is currently in Beta. Learn more. :::

Generative Remove

remove: Removes an object in an image using Generative AI

:::tip The generative remove transformation is currently in Beta. Learn more. :::

Generative Replace

replace: Replaces an object in an image using Generative AI

:::tip The generative replace transformation is currently in Beta. Learn more. :::

Generative Replace Background

replaceBackground: Replaces the background of an image with an AI-generated background.

:::tip The generative replace background transformation is currently in Beta. Learn more. :::

Filters & Effects

Included in the Cloudinary transformations library are different filters and effects that allow you to recolor, improve, fix, and artistically transform your images.

Blur

blur: Applies a blurring filter to an asset.

Grayscale

grayscale: Converts an image to grayscale (multiple shades of gray).

Opacity

opacity: Controls the opacity level of an image.

Pixelate

pixelate: Applies a pixelation effect.

Tint

tint: Blends an image with one or more tint colors.

Chaining Multiple Effects

effects: An array of objects the configure the effects to apply to an image.

More Filters & Effects

Learn about what other filters and effects are supported on CldImage Configuration.

Image Overlays

Image overlays allow you to place one or multiple images on top of another image.

Overlay Image by Public ID

overlays: Any array of overlay objects

Overlay Image with Blend Mode

appliedEffects: When configured on an overlay object, allows you to set an effect that applies a blend mode, such as "multiply"

Image Underlays

Image underlays allow you to place one or multiple images behind a base image.

Replace Background with Image

underlay: Public ID of image to use under base image

Replace Background with Multiple Images

underlays: Array of underlay objects

Text Overlays

Text overlays allow you to place text on top of an image.

Adding Custom Text

overlays: Uses overlay objects to add text on top of an image.

Adding Text with Effects

effects: Applies effects to the overlaid text.

Misc

Video Thumbnail

assetType: Specifies the type of asset to be delivered.

This is handy when wanting to create an image thumbnail from a video, where the asset type would be "video", yet delivering an image.

More Examples

Find more examples on Social Card Templates.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky