10 - Cloudinary Media Library

November 28, 2021

WARNING: This post is over a year old. Some of the information this contains may be outdated.

Register on Cloudinary.

Go to config.php, add your cloud name and API key under the services key.

<?php

return [
    // ...
    'services' => [
        'cloudinary' => [
            'cloudName' => 'artisanstatic',
            'apiKey' => '365895137117119',
        ],
    ],
    // ...
];

Now you can use the media() helper in your Blade templates to easily reference files in your Cloudinary library.

<img src="{{ media('logo.png') }}">
<!-- is the same as -->
<img src="https://res.cloudinary.com/YOURCLOUDNAME/logo.png">

Cloudinary is also integrated into Netlify CMS. To ensure that this works, make sure your browser isn't blocking any cookies from Cloudinary.

Netlify CMS integration


Para comentar acesse a sessão abaixo.