Sara Soueidan 1/2/2018

Cropping & Scaling Images Using SVG Documents

Read Original

This technical article explores how to use SVG documents, specifically the viewBox and preserveAspectRatio attributes, to crop, scale, and position raster images. It presents SVG as a practical fallback or alternative to the CSS object-fit and object-position properties for handling responsive images with different aspect ratios, particularly in UI development scenarios.

Cropping & Scaling Images Using SVG Documents

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser