Why c_limit is apply on SVG ?

ZecKa
ZecKa Member Posts: 8
edited October 25 in General

The c_limit parameter is applied to avoid upscaling images. However, it also seems to be applied to SVG files, which doesn't make sense because SVGs are vector-based and don't have "upscaling" issues.

For example, if "example.svg" has a size of 500px, the following URL will return a PNG of 500px instead of the expected 1000px:

https://res.cloudinary.com/enomi/image/upload/w_1000,c_limit/example.svg

Tagged:

Comments

  • DannyFromCloudinary
    DannyFromCloudinary Member, Cloudinary Staff Posts: 154

    Hi @ZecKa. Thanks for getting in touch.

    You're absolutely right - usually, scaling a vector file doesn't have an impact on file size or visual fidelity. Many of our assets are delivered as rasterised files though, and when we perform c_limit, we don't check the file format of the source file. This is because the format can be altered by other transformation parameters.

    My advice would be to avoid using c_scale when delivering SVG files.

    Let us know if you have any further questions.

    Kind regards,
    -Danny