Update: Take a look at the February 2025 Refresh blog post which describes using our image tag helpers to generate srcset
values.
Content hub assets
You should model all images, videos, pdfs, files, etc... as Content items with a content item asset field.
This gives you the most power to leverage things like searching for content items, smart folders, taxonomies, image optimization, and the upcoming image cropping, variants, and AIRA based focal point detection which will be released next week (February 2025 Refresh).
Administrators can define the variants you want to support for images across your Xperience solution. When a marketer uploads an image it will be optimized (on-upload) and variants will be generated (on-request) when they are used across the various channels. The variants can be referenced by code name and Xperience will generate the correct URL for them.
I believe we will also be releasing an ASP.NET Core tag helper to help you generate URLs for images based on those variant code names. You can use this to create responsive <figure>
or <picture>
elements with srcset=""
attributes. But we will also give access to a lower level dictionary of image variant metadata with the variant code name as the "key". The metadata will include the URL, width, and height of the image.
Yes, media libraries will be deprecated in the future once the digital asset management capabilities in the Content hub are mature enough (within the next few Refreshes).
If a customer built a project using media libraries they can use the media library migration support we will release (same time frame as deprecation of the media library).
Integrations
As a side note, there's also an open-source community authored integration - Xperience Community: Image Processing - for dynamic resizing of image asset content items in the Content hub. I think most of its features will be handled natively with the upcoming Refresh.