Skip to content

Making Recent Post Widget Extended Support Photon #83

@pramyogo

Description

@pramyogo

Hello how to make Recent Post Widget support with Phonton, i was asking with Jetpack Team and they said i must contact the plugin author.

Please consider supporting Photon for the widget images displayed here.

To support phonton Jetpack Team said use the jetpack_photon_url filter in this plugin. This The Example

/
  Add Photon support to any image.
  The jetpack_photon_url filter will allow Photon to serve the images if Jetpack's Photon module is on.
 
  The filter allows you to pass an image URL, and some optional parameters.
 
  @param string $image_url Any image URL can be used.
  @param array|string $args Optional options to manipulate images.
      @see https://developer.wordpress.com/docs/photon/api/
  @param string $scheme Optional scheme in which to return image.
      Accepts <code>http</code>, <code>https</code>, and <code>network_path</code> (no protocol).
 */
$image_url = 'http://mysite.com/img/logo.png';
$args = array(
	'filter' => 'grayscale',
	'resize' => '600,200',
);

echo apply_filters(
	'jetpack_photon_url',
	esc_url( $image_url ),
	$args,
	'https'
);

You can see Jetpack Team comment on Jetpack Support

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions