• Resolved davidbhayes

    (@davidbhayes)


    We’re seeing on the “select featured images” box on our posts “Suggested image dimensions: 1200 by 675 pixels.” This warning seems to be coming from the AMP plugin (when we disable it, it goes away).

    The concern (from our editorial team) is that these sizes don’t match what we want. Is there a hook or some other system by which we can change the dimensions listed there and/or easily hide this warning?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    Yes there is!

    This was previously reported on a GitHub issue. In the pull request, you can use the amp_featured_image_minimum_height and amp_featured_image_minimum_width filters in PHP.

    To disable the suggestions entirely, you should be able to use this PHP code:

    add_filter( 'amp_featured_image_minimum_height', '__return_zero' );
    add_filter( 'amp_featured_image_minimum_width', '__return_zero' );

    Or to supply custom dimensions:

    add_filter( 'amp_featured_image_minimum_height', static function () {
    	return 1000;
    } );
    add_filter( 'amp_featured_image_minimum_width', static function () {
    	return 500;
    } );

    Note that the dimensions currently used in the plugin by default are from the guidelines on Google Search

    Thread Starter davidbhayes

    (@davidbhayes)

    Thanks @westonruter! ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Suggested Image Size’ is closed to new replies.