Conversation
supportIs there any way to choose the size of the post image displayed with a filter or something? It would be great if I could choose my own image sizes. Best regards.
Hi Dieter, The image size is determined in CSS. It is optimized to have 3 related posts with an image in the extended view. If you prefer 2 related posts, you could use it that way and have custom CSS added to Appearance > Customizer > Custom CSS. html body li.related-post.extended_view,html body li.related_du-post.extended_view { width: 48%; } Does that help you? This reply was modified 3 years, 4 months ago by Marcel Pol . This reply was modified 3 years, 4 months ago by Marcel Pol .
Hi Marcel, I am interested in improving the loading time and therefore I would like to load my own thumbnails with suitable image size. I have seen that your plugin loads the image size “Medium”, which is already good. https://plugins.trac.wordpress.org/browser/related/tags/3.2.0/related.php#L346 My question was if I can load another image size, for example a custom one like “Small_large” via a filter? In some other plugins this is possible, hence my question. If not, I have already found a solution. I can specify the image size “Medium” so that it fits for me (280x210px). I then have to recreate the thumbnails but that’s OK.
Hi Dieter, that is really great feedback, thank you. In the version 3.3.0 you can use a PHP filter to change the thumbnail size. function my_related_show_post_tn_size( $tn_size ) { return 'medium'; } add_filter( 'related_show_post_tn_size', 'my_related_show_post_tn_size' ); This reply was modified 3 years, 4 months ago by Marcel Pol .
Hi Marcel, fantastic, it works like a charm! Super work! Thank you very much! This reply was modified 3 years, 4 months ago by Dieter Geiling . This reply was modified 3 years, 4 months ago by Dieter Geiling .
Hi Dieter, The image size is determined in CSS. It is optimized to have 3 related posts with an image in the extended view. If you prefer 2 related posts, you could use it that way and have custom CSS added to Appearance > Customizer > Custom CSS. html body li.related-post.extended_view,html body li.related_du-post.extended_view { width: 48%; } Does that help you? This reply was modified 3 years, 4 months ago by Marcel Pol . This reply was modified 3 years, 4 months ago by Marcel Pol .
Hi Marcel, I am interested in improving the loading time and therefore I would like to load my own thumbnails with suitable image size. I have seen that your plugin loads the image size “Medium”, which is already good. https://plugins.trac.wordpress.org/browser/related/tags/3.2.0/related.php#L346 My question was if I can load another image size, for example a custom one like “Small_large” via a filter? In some other plugins this is possible, hence my question. If not, I have already found a solution. I can specify the image size “Medium” so that it fits for me (280x210px). I then have to recreate the thumbnails but that’s OK.
Hi Dieter, that is really great feedback, thank you. In the version 3.3.0 you can use a PHP filter to change the thumbnail size. function my_related_show_post_tn_size( $tn_size ) { return 'medium'; } add_filter( 'related_show_post_tn_size', 'my_related_show_post_tn_size' ); This reply was modified 3 years, 4 months ago by Marcel Pol .
Hi Marcel, fantastic, it works like a charm! Super work! Thank you very much! This reply was modified 3 years, 4 months ago by Dieter Geiling . This reply was modified 3 years, 4 months ago by Dieter Geiling .