Table of Contents

Namespace ToSic.Sxc.Images

Images are super-important in websites - and we want to make sure that they are

  1. perfect by default
  2. consistently resized to the perfect size
  3. optimized for all kinds of browsers and scenarios
Tip

We suggest you read the Image Guide for maximum power!

📔 Images Guide (Best Practices & Code)

Classes

Recipe

A recipe contains instructions how to generate tags etc. which can contain multiple resized images

Interfaces

IResizeSettings

Settings how to resize an image for the src or srcset attributes.

It's read only, to create it, use the IImageService

IResponsiveImage

A object which contains everything to create HTML for responsive img tags with optimal srcset offering all the sizes you may need.

You can simply add this object to the source, like @image to render the image - which is the same as @image.ImgTag

IResponsivePicture

A object which contains everything to create HTML for responsive picture tags with optimal srcset offering all the sizes you may need