• Basics
  • Abyss
  • Web APIs
  • C# & Razor
  • .net API
  • JS & TS API
Search Results for

    Show / Hide Table of Contents

    Image Resizer

    you are here (click to zoom) - discover the stack

    2sxc has an awesome Image Resizer built in.

    It's really easy to use - just add url parameters to the image. So instead of img.jpg add img.jpg?w=200 to resize it to 200px width.

    Internally it uses the amazing ImageFlow which has the same URL setup as the previous ImageResizer.net.

    How to Use

    You can learn about the url parameters in the Image Resizer URL Parameters

    But normally you won't use them directly, because it's better to use APIs which will set these parameters for you. Your best options are:

    1. The IImageService with .Img(...) or .Picture(...) which will create the best possible HTML for you
    2. The Link.Image(...) which will create the best possible URL for you

    In most scenarios you will prefer the IImageService. In cases where you need exactly 1 url (like in background-url CSS) you will probably use the Link.Image(...).


    History

    1. Introduced in 2sxc 5.03
    2. Special Razor API to create links called Link.Image introduced in 12.04
    3. Introduced ImageFlow in v12 for Oqtane
    4. Switched to ImageFlow in 13.0 for both Dnn and Oqtane
    5. Introducing IImageService in 13.05 beta, to be released in 13.10

    Shortlink: https://go.2sxc.org/resize

    • Improve this Doc
    In This Article
    Back to top Generated by DocFX