WordPress.org

Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #44427, comment 2


Ignore:
Timestamp:
06/24/2018 03:40:09 PM (2 years ago)
Author:
jonoaldersonwp
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #44427, comment 2

    v1 v2  
    991. Inline images, inserted in content; where we'll be adding a bunch of `data-` params to the code. We'll need any existing or new filtering/validation to anticipate and manage this (or, to transform the code via a filter on `the_content`, if we're concerned about code bloat or confusion in the content editor).
    1010
     111a) Gutenberg blocks.
     12
    11132. Theme/template images which use `wp_get_attachment_image()` or similar to output image HTML. We'll need to hook into these with an additional parameter (we ''shouldn't'' make this a universal default/assumption, as many themes use 'hero images' in header areas where lazy-loading may produce an unwanted delay).
    1214
    13153. Theme/template images which use `wp_get_attachment_image_srcset()` or similar to construct the output of the `img`/`picture` etc tag. This poses a challenge.
    1416
    15 The first and the second feel achievable; some settings, an extra parameter in the case of **2**, and everything else can happen under the hood. 
     17The first and the second feel achievable; some settings, an extra parameter in the case of **2**, and everything else can happen under the hood.
    1618
    1719The third feels like the messiest for easy adoption; we're relying on a significant change to coding approaches, which @mor10 rightly wants to avoid. Thoughts appreciated!