osompress / genesis-portfolio-pro

Plugin: Genesis Portfolio Pro
24 stars 14 forks source link

Remove `wp_make_content_images_responsive` #53

Closed dreamwhisper closed 4 years ago

dreamwhisper commented 4 years ago

Images already get srcset via wp_calculate_image_srcset in wp_get_attachment_image.

wp_make_content_images_responsive is deprecated in WordPress 5.5.

Fixes #52

How to test

  1. Install WP 5.5 and a Genesis child theme along with this plugin branch.
  2. Create a portfolio item (Portfolio Items > Add new) and set a featured image.
  3. Add a Genesis - Portfolio widget to a widget area.
  4. Make sure the image includes srcset and sizes.

Note: images will only include srcset and sizes if the image has a similar aspect ratio to 300x200. Upload an image that is much larger to test.

Documentation

No documentation required.

Suggested changelog entry

Removed use of wp_make_content_images_responsive portfolio widget images; srcset is applied via wp_calculate_image_srcset in wp_get_attachment_image used by genesis_get_image.

Notes