This package is abandoned and no longer maintained. The author suggests using the cloudconvert/cloudconvert-laravel package instead.

A Laravel wrapper for the CloudConvert API

v3.0 2020-01-16 20:51 UTC


A Laravel wrapper for the CloudConvert API. See for more details.

Build Status Latest Stable Version Total Downloads Latest Unstable Version License


Install this package through Composer.

Add this to your composer.json dependencies:

Using Laravel 5.0+

"require": {
   "robbiep/cloudconvert-laravel": "2.*"

Using Laravel ~4.2

"require": {
   "robbiep/cloudconvert-laravel": "1.*@dev"

Run composer install to download the required files.

Next you need to add the service provider to config/app.php

'providers' => array(

One more step.

You need to publish the config php artisan vendor:publish

Just enter your API key in config/cloudconvert.php

You can get your free API key by registering at

Now you can use CloudConvert in your application!


There's many ways to use CloudConvert. I'll cover a few of them here, for all the converter options I suggest checking out the API docs.

File conversion

# Convert the file to /a/path/to/file.mp4

# Convert the file and save it in a different location /a/new/path/to/new.mp4

# It also works with Laravel's file upload

if (Input::hasFile('photo'))
    CloudConvert::file( Input::file('photo') )->to('/a/local/path/profile_image.jpg');
# Convert the image to kitty.jpg with quality of 70%

# Convert a PowerPoint presentation to a set of images, let's say you only want slides 2 to 4
# This will save presentation-2.jpg, presentation-3.jpg and presentation-4.jpg

CloudConvert::file('presentation.ppt')->pageRange(2, 4)->to('jpg');

Dynamic file conversion

# Dynamic PDF creation using DOCX/PPTX templates
# See this blog post for more details:

$variables = ['name' => 'John Doe', 'address' => 'Wall Street'];

Converter options

There are many more conversion options. I've put shortcuts like the ones above for the most common. However you can pass through any options you like using the withOptions method, such as:

# Convert the meow.wav to meow.mp3 with a frequecy of 44100 Hz and normalize the audio to +20dB

    'audio_frequency' => '44100', 
    'audio_normalize' => '+20dB'

# Convert the fido_falls_over.mp4 to fido.gif but you only want 10 seconds of it, starting at 1:02

    'trim_from' => '62', 
    'trim_to' => '72'

# Or the same with using the shortcuts:

Chaining multiple conversions

You can also chain multiple conversions on one process, like this:

# Convert a TrueType font in to all the fonts you need for a cross browser web font pack

CloudConvert::file('claw.ttf')->to('eot', true)->to('otf', true)->to('woff', true)->to('svg');

# Or the same thing with an array
CloudConvert::file('claw.ttf')->to(['eot', 'otf', 'woff', 'svg']);

Remote files

It will also work with converting remote files (just make sure you provide a path to save it to)

# Convert Google's SVG logo hosted on Wikipedia to a png on your server


Merging PDFs

At the moment, merging only works with remotely hosted files, however in the future it will work with uploaded files and files from storage

# Merge the PDFs in the array in to a single PDF


Website screenshot

CloudConvert will also take a screenshot of a website and convert it to an image or pdf for you:

# Take a screenshot with the default options: 1024px with with full height of webpage

# You can also specify the width and the height as converter options

                 'screen_width' => 1024,
                 'screen_height' => 700

Converting to and from external storage options

At the moment CloudConvert let you use FTP or Amazon S3 as storage options. However it looks like in the future they will add Google Drive and Dropbox to the API

**Please note: ** To use these storage options you will need to provide the configuration in the config/cloudconvert.php

# Lets say you have a PDF and you want to convert it to an ePub file and 
# store it on your Amazon S3 bucket (defined in your config). It's this simple:

# You can also override the default options by providing them as an array as the second argument

            ->to(CloudConvert::S3('Garfield_converted.epub', [
                'bucket'  => 'a-different-bucket',
                'acl'     => 'public-read',
                'region'  => 'us-east-1'
# Now you want to convert the file on your S3 to a txt file and store it on a server via FTP


It's that simple. The storage options CloudConvert::S3($path) and CloudConvert::FTP($path) can be used for both input files and output files.

Non-blocking conversion using a callback URL

When the conversion might take a long time you could use:

# Script: sendConversion

# Script: saveFile

Non-blocking conversion using a queue

To use queues you will need have set-up either beanstalk or iron in your config/queue.php

# The queue will check every second if the conversion has finished. 
# It times out after 120 seconds (configurable).

CloudConvert::file('/a/path/to/')->queue('to', '/a/path/to/file.mp4')

Conversion types

You can view the conversion types using the conversionTypes() method. It always returns Illuminate\Support\Collection.

# To get all possible types

$types = CloudConvert::conversionTypes();
# To get all possible types in a specific group

$types = CloudConvert::conversionTypes('video');
# To get all possible output formats if you know the input format

$types = CloudConvert::input('pdf')->conversionTypes();
# Same if you know the output format and want to see what can be inputted

$types = CloudConvert::output('jpg')->conversionTypes();

Processes status

You may want to list all your processes, running, finished and failed. It always returns a Illuminate\Support\Collection.

# To get all possible types
$processes = CloudConvert::processes();

# To delete a process by ID

Artisan commands

If you want to do quick conversions or calls to the API from your console, you can use the following commands:

Convert a file

# Options: --opions, --background, --storage, --path
php artisan cloudconvert:convert mp4
php artisan cloudconvert:convert /path/to/ converted.mp4 --storage='s3'

Website screenshot

# Options: --opions, --storage, --path
php artisan cloudconvert:website jpg

Processes list

# Options: --delete (used with process_id)
# Argument: process_id (optional) - will show the status of that process
php artisan cloudconvert:processes <process_id>

Conversion types

# Options: --input, --output 
# (both optional - however if you included both you will see all the 
# possible converter options for those types, not just the default ones)
php artisan cloudconvert:types
php artisan cloudconvert:types --input='nice.pdf'
php artisan cloudconvert:types --input='doc' --output='jpg'

Using this package without Laravel

You still need to use composer. Type composer require robbiep/cloudconvert-laravel to download the files, then you can use the package like this:


$cloudConvert = new RobbieP\CloudConvertLaravel\CloudConvert(['api_key' => 'API_KEY_HERE']);



  • Release
  • Write some more tests
  • Enable merging of multiple files
  • Enable multiple conversions using one process
  • Refactor the commands
  • Added support for Guzzle ~6.0
  • Readme file is getting long, convert to wiki


  1. Fork it
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request


Thanks to Lunaweb Ltd. for their API. Go check it out.