cloudinary / pkg-cloudinary-core

Distribution repository for the Cloudinary JavaScript library. Cloudinary is an end-to-end solution for all your image and video needs.
MIT License
54 stars 28 forks source link

Images returning 400 from cloudinary.url() #17

Closed rpylipow closed 7 years ago

rpylipow commented 7 years ago

I'm receiving an error while trying to transform and fetch an image.

Failed to load resource: the server responded with a status of 400 (Bad Request)

What's strange is that most of my images work as expected while others do not. I'm passing each image url through the same code.

import * as cloudinary from 'cloudinary-core';
const cl = cloudinary.Cloudinary.new({ cloud_name: MY_CLOUD_NAME });

const image = cloudinary.url(SOME_IMAGE_URL, {
      width: 120,
      height: 120,
      crop: 'fit',
      quality: 'auto:best',
      fetch_format: 'auto',
      type: 'fetch',
});

Not working: http://res.cloudinary.com/structural/image/fetch/c_fit,f_auto,h_480,q_auto:best,w_480/http://blog.yourencore.com/hubfs/DeJongeWoodPR.png%3Ft%3D1492107211790

Working: http://res.cloudinary.com/structural/image/fetch/c_fit,f_auto,h_480,q_auto:best,w_480/http://blog.yourencore.com/hubfs/Pharmcast_Ep19_FeaturedImage.png%3Ft%3D1494510722775

It's likely that I'm making a dumb mistake, but the error message that I'm receiving isn't telling me much about what I'm doing wrong.

Any ideas?

mhoc commented 7 years ago

https://support.cloudinary.com/hc/en-us/articles/202520592-Do-you-have-a-file-size-limit-

If you're on the free plan, Cloudinary has a file size limit of 10MB. It looks like your first image is around 12MB.

rpylipow commented 7 years ago

You're so smart. Thanks.

eitanp461 commented 7 years ago

@rpylipow FYI, error details are returned by the X-Cld-Error header on the response image