How can i delete all the image meta data in cloudinary ? - cloudinary

Is there a way to delete all the metadata related to images in cloudinary?
I want to delete - faces, colors, exif, image_metadata, context, pages, phash, coordinates etc.
Is there an API to do so?

Image meta-data is automatically stripped whenever Cloudinary applies a transformation on an image.
If you want to strip the metadata from an original image, you can apply the flag 'force_strip' upon upload as an incoming transformation.|
Here is a ruby sample on how to apply the force strip to an original on upload:
Cloudinary::Uploader.upload("sample.jpg", :transformation => [{:flags => "force_strip"}])

Related

Cloudinary upload image widget does not work as expected

I am using the upload image widget without success.
1) result.info.path returns invalid url.
2) There is no preview of the uploaded images due to no.1
3) No images are were uploaded to my media folder at Cloudinary.
Fiddle:
https://jsfiddle.net/7uqb83t1/
These are my preset settings:
Can someone share a working version of this widget + preset settings?
On successful upload, you need to check result.info.secure_url for a link to the asset. Currently, in your preset, you're using Async which means the incoming transformation is performed in the background (asynchronously), and as such, you will get a pending result. Async assumes you're using a Notification URL as a webhook where you'll receive the Upload API response when the processing is complete. In your case, I'd recommend turning the Async off.
Also, your incoming transformation configured in the preset is not valid and because of that, you will be getting an error on upload. Please console.log this in your JSFiddle to see it. Essentially, it'll be -
Auto gravity can only be used with crop, fill, lfill, fill_pad or
thumb
'auto' gravity (g_auto) implies cropping (automatically selecting the most interesting part of the image to focus on) and therefore you need to use an appropriate crop mode. 'scale' keeps all image data and no cropping is made so that is why g_auto can't work with it. Please see the following section of the documentation for details on the different crop modes - https://cloudinary.com/documentation/image_transformation_reference#crop_parameter - which will help you decide which one you want to use.
Lastly, you should also consider updating your incoming transformation so that it only resizes once, since currently, resizing it three times with the same crop mode is redundant. For example, you can use c_scale,q_auto,w_687 only, or if you want with 'auto' gravity you can try c_fill,g_auto,q_auto,w_687.

How to upload photo with q_auto in Cloudinary?

I'm having trouble in rendering my images because the file size is big, so I would like to adjust the size, to render it faster.
I would like to upload my photo like this.
"https://res.cloudinary.com/demo/image/upload/q_auto:low/woman.jpg"
I would like also to upload like, https://res....../upload/q_60/woman.jpg.
Thanks for the help.
You can apply incoming transformations while setting the quality parameter to your desired value. Doing so will apply the transformations before the resource is actually saved on your account.
Another option would be to set a default image quality via your account's setting.

phoenix: show image from aws s3

I study the phoenix, create an application that loads the image on aws s3, and then displays it. I was able to upload the image to the cloud, but now it is not clear how to display it to the user on the page (I do not want to make public link to these images in the cloud). I was looking for information on this issue, but did not find anything useful.
From the clouds I get the file as binary data. Do I need to create some of these data is a temporary file that will be displayed on the page? I can display the image as base64, but I think this is not the best way. I would appreciate advice.
Since you've already fetched the image to a binary, you can just send it directly to the client with the appropriate content type and the browser will render it as an image. For example, to fetch and send the png at https://upload.wikimedia.org/wikipedia/commons/7/70/Example.png:
def index(conn, _params) do
image = HTTPoison.get!("https://upload.wikimedia.org/wikipedia/commons/7/70/Example.png").body
conn
|> put_resp_header("content-type", "image/png")
|> send_resp(200, image)
end
If you open this in your browser, you'll see the image being rendered correctly because of the content-type header.

How to upload photos using CakePHP 2.0

I'm developing a simple web app and I just want to allow the user to upload some pictures.
should I just store the picture url on my database table or should I upload the whole picture?
how can I validate the size of the picture being uploaded?
how can I upload the picture from my controller?
thank you all!
I would NOT store the image data in the database. I would create a Behavior that will upload the image to the image directory and store a reference to that image. The behavior can then handle size, mime type, etc. Then add a file upload form to the controller and when the data goes to the model to be saved, it will automatically upload the image and put it where it goes.
If you do not want to build your own, here is a very popular behavior that someone has built.
https://github.com/jrbasso/MeioUpload
Or you could try this simple way of doing it (check the readme.md file) :
https://github.com/malikov/cakephp2.0-image-upload

rails 3 saving default image while uploading using paperclip

i use paperclip to upload images to the server in rails 3. If the user didn't choose any file to upload i want to store a default image in the server i.e., storing a default image in different size like thumb, normal, feature...
:default_url => '/images/:attachment/missing_:style.png'
I already put the above line in the config/initialize folder.
But for my popup slider i use jAlert in that i use js(to read the image from the server) and db(to get the object id) to show the images. So if an id didn't have any image then no folder(thumb, normal,...) are created.
For that reason i want to store default image for id which didn't have image.
My basic need is to make image slider in a popup window.
Thanks,
Arivarasan L