OptimizationPerformanceResponsive Web Design 1 Comment Support for responsive images was added to WordPress core in version 4.4 to address the use case for viewport-based image selection, where the browser requests the image size that best fits the layout for its particular viewport. Images that are inserted within the text of a post automatically get the responsive treatment, while images that are handled by the theme or plugins — like featured images and image galleries — can be coded by developers using the new responsive image functions and filters. With a few additions, WordPress websites can accommodate another responsive image use case known as art direction. Art direction gives us the ability to design with images whose crop or composition changes at certain breakpoints. In this article, I’ll show you how to set up a WordPress website for art direction by going through three progressive examples: In the art direction example, we’ll be adding some PHP, a polyfill and a cropping plugin to the website. WordPress’ Automatic Support For Responsive Images Within Posts Support for responsive images is all about options: We provide a well-described array
Share This

We are using cookies on our website

Please confirm, if you accept our tracking cookies. You can also decline the tracking, so you can continue to visit our website without any data sent to third party services.