Why this matters is listed below.
===============================================================================================
Instead of coding add_image_size() and set_post_thumbnail_size(), now you simply configure an array and pass that to this class / methods. Here's an example of what that array looks like:
Note: This example also has settings (1) for:
-
https://github.com/WPezPlugins/wp-ezplugins-templates-picturefill-js
-
https://github.com/WPezClasses/class-wp-ezclasses-templates-picturefill-js
(1) The settings are simply an example of what's possible. The Picturefill plugin / class uses its own settings (for now) so that example remains free-standing. In an ideal WP dev world you'd lean on a single array that defines all your WP image needs. Why sprawl if you don't have to?
===============================================================================================
"Why is this a better way to think about WordPress themes and how to implement additional custom images?"
-
Less actual code, a lot less. This is (mostly) simply configuring an array and using a couple methods.
-
Centralization: All the key WP theme image stuff wrapped up in one.
-
Flexibility: An example: Set the width, pick an (aspect) ratio, and the height will be calculated for you.
-
Simplicity: New project / theme, same widths / breakpoints, set different ratios (to achieve a slightly differnt look)...Done.
-
Pair it with Class_WP_ezClasses_Templates_Picturefill_js and dev life gets even better.
-
Dumb it down: Your new designer isn't all that WP savvy (yet); so give him / her your boilerplate widths and request they stick to the predefined ratios. Chance are 400 x 300 is just a good as 400 x 293 (or some close but none the less custom ratio).
-
Control: Fully custom width and height are still possible. Possibilities have not been removed, just automated and supplemented.
===============================================================================================