How I can generate Account Hash for Cloudflare Images?
Hi everyone, I am trying to find an algorithm for generating an Account Hash for Cloudflare Images using Java.
Does someone know how Cloudflare generate Account Hash for Images?
And does it possible to generate Account Hash using Java?
12 Replies
What do you mean by "Account Hash"?
Could you give an example?
Oh I see, I don't think that is something that is generated. That is just something you look up in the dashboard and store
Thank you for your response) We are trying to understand does it is possible to generate it because we already store in configs Bearer, Default Image Key, Account Id. It is a very big number for us. We are trying to minimize the number of keys on the backend side.
You can't generate it. The only way to retrieve it programatically is by calling an undocumented API endpoint, since it doesn't change it's recommended as zeg says to store it
Okay, Thank you)
I am sorry, Could we discuss it in private messages?
GET /accounts/<account_id>/images/v1/account
returns the encrypted_id
in the result
But its undocumented so it may change or be removed at any time without warning
Why? I don't provide support in direct messages unless there's a very good reason it can't be publicSorry, I asked it because I was thinking that you didn't send me an undocumented endpoint in a public post
@Erisa | Support Engineer Thank you for your help.
Also, maybe you know how we can upload image in original dimension to Cloudflare Images?
Now we are working on migration our media gallery to Cloudflare Images and we found that after uploading images to Cloudflare all of them resized to standard public sizes. Is it possible to upload images with original dimension?
They should upload with their original dimensions and then be served with whatever size you applied on the variant. The default "public" variant is 1366x768 so you could either edit that or create and use your own variant
Resize images · Cloudflare Image Optimization docs
Resizing images in Cloudflare Images works by creating variants of your image. Variants let you specify how images should be resized for different use …
But we have a lot images with different dimensions and we want to save original dimension for all images. Is it possible?
The variants will never resize an image higher than its original resolution, so you can create a variant with an extremely large size and it will work with any image up to that size
Thank you very much.
Yes, we put 1 000 000 x 1 000 000 and image saved with original dimension. Thank you)
No problem