Coder Social home page Coder Social logo

Comments (5)

yaniv-li avatar yaniv-li commented on August 16, 2024

@amezick
we can make configurable I would take it with @naveenpras

from cloudinary_sfcc_pagedesigner.

naveenpras avatar naveenpras commented on August 16, 2024

Based on discussions, we'll attempt to expose this through code initially. We can think about exposing this through the UI later on.

from cloudinary_sfcc_pagedesigner.

amezick avatar amezick commented on August 16, 2024

That works for me.

from cloudinary_sfcc_pagedesigner.

naveenpras avatar naveenpras commented on August 16, 2024

Angus needs to set the upper limit for the breakpoint, e.g. say that we need to set the biggest breakpoint.

from cloudinary_sfcc_pagedesigner.

naveenpras avatar naveenpras commented on August 16, 2024

The example is:
Pick a image at 400x400
The srcsets start at 2000 px and so the image is scaled up.

Check
function getBreackpoints(publicId) {
var body = {
timestamp: (Date.now() / 1000).toFixed(),
public_id: publicId,
type: 'upload',
responsive_breakpoints: [
{
bytes_step: 20000,
max_width: 1000,
max_images: 20,
min_width: 200
}]
};
body.signature = utils.addSignatureToBody(body);
body.responsive_breakpoints = utils.stringifyJson(body.responsive_breakpoints);
body.api_key = currentSite.getCustomPreferenceValue('CloudinaryPageDesignerAPIkey');
var r = utils.callService(body, 'image', 'explicit');
if (r.ok) {
var result = r.message;
return getBreackpointsFromResponse(result);
}
return [1280, 768, 375];
}

from cloudinary_sfcc_pagedesigner.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.