Skip to content

Commit

Permalink
Improve image thumbnail quality.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanbohacek committed Feb 20, 2023
1 parent b33b264 commit dc566b5
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion includes/rss-feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function rss_feed( $query_var ) {
public function rss_feed_image( $content ) {
global $post;
if ( has_post_thumbnail( $post->ID ) ){
// $content = '<p>' . get_the_post_thumbnail( $post->ID, 'medium' ) . '</p>' . $content;
// $content = '<p>' . get_the_post_thumbnail( $post->ID, 'large' ) . '</p>' . $content;
$content = '<p>' . get_the_post_thumbnail( $post->ID ) . '</p>' . $content;
}
return $content;
Expand Down
2 changes: 1 addition & 1 deletion loop.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}

if ( has_post_thumbnail() ){
$post_thumbnail_url = get_the_post_thumbnail_url( $post_id, 'medium' );
$post_thumbnail_url = get_the_post_thumbnail_url( $post_id, 'large' );
$post_thumbnail_url_full = get_the_post_thumbnail_url( $post_id );

$dominant_color = get_post_meta( $post_id, 'dominant_color', true );
Expand Down
4 changes: 2 additions & 2 deletions page.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
) );

foreach ( $latest_projects as $project ) {
$post_thumbnail_url = get_the_post_thumbnail_url( $project->ID, 'medium' );
$post_thumbnail_url = get_the_post_thumbnail_url( $project->ID, 'large' );
$post_thumbnail_url_full = get_the_post_thumbnail_url( $project->ID );
$dominant_color = get_post_meta( $project->ID, 'dominant_color', true );
$dominant_color_css = str_replace('[', 'background-color:rgb(', $dominant_color);
Expand Down Expand Up @@ -144,7 +144,7 @@
) );

foreach ( $latest_blog_posts as $blog_post ) {
$post_thumbnail_url = get_the_post_thumbnail_url( $blog_post->ID, 'medium' );
$post_thumbnail_url = get_the_post_thumbnail_url( $blog_post->ID, 'large' );
$post_thumbnail_url_full = get_the_post_thumbnail_url( $blog_post->ID );
$dominant_color = get_post_meta( $blog_post->ID, 'dominant_color', true );
$dominant_color_css = str_replace('[', 'background-color:rgb(', $dominant_color);
Expand Down
4 changes: 2 additions & 2 deletions search.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
) );

foreach ( $latest_bots as $bot ) {
$post_thumbnail_url = get_the_post_thumbnail_url( $bot->ID, 'medium' );
$post_thumbnail_url = get_the_post_thumbnail_url( $bot->ID, 'large' );
$post_thumbnail_url_full = get_the_post_thumbnail_url( $bot->ID );
$dominant_color = get_post_meta( $bot->ID, 'dominant_color', true );
$dominant_color_css = str_replace('[', 'background-color:rgb(', $dominant_color);
Expand Down Expand Up @@ -141,7 +141,7 @@
) );

foreach ( $latest_blog_posts as $blog_post ) {
$post_thumbnail_url = get_the_post_thumbnail_url( $blog_post->ID, 'medium' );
$post_thumbnail_url = get_the_post_thumbnail_url( $blog_post->ID, 'large' );
$post_thumbnail_url_full = get_the_post_thumbnail_url( $blog_post->ID );
$dominant_color = get_post_meta( $blog_post->ID, 'dominant_color', true );
$dominant_color_css = str_replace('[', 'background-color:rgb(', $dominant_color);
Expand Down
4 changes: 2 additions & 2 deletions single.php
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ function get_network_name( $network ){
}

foreach ( $related_bots as $related_bot ) {
$post_thumbnail_url = get_the_post_thumbnail_url( $related_bot->ID, 'medium' );
$post_thumbnail_url = get_the_post_thumbnail_url( $related_bot->ID, 'large' );
$post_thumbnail_url_full = get_the_post_thumbnail_url( $related_bot->ID );
$dominant_color = get_post_meta( $related_bot->ID, 'dominant_color', true );
$dominant_color_css = str_replace('[', 'background-color:rgb(', $dominant_color);
Expand Down Expand Up @@ -508,7 +508,7 @@ function get_network_name( $network ){
) );

foreach ( $latest_blog_posts as $blog_post ) {
$post_thumbnail_url = get_the_post_thumbnail_url( $blog_post->ID, 'medium' );
$post_thumbnail_url = get_the_post_thumbnail_url( $blog_post->ID, 'large' );
$post_thumbnail_url_full = get_the_post_thumbnail_url( $blog_post->ID );
$dominant_color = get_post_meta( $blog_post->ID, 'dominant_color', true );
$dominant_color_css = str_replace('[', 'background-color:rgb(', $dominant_color);
Expand Down

0 comments on commit dc566b5

Please sign in to comment.