Tagged: x
-
AuthorPosts
-
April 20, 2016 at 8:20 am #891759
christiaan pParticipantHi guys love the theme and have been using it for some time now, but have had the same issue with the Portfolio,
it is super slow, and pisses of viewers as they have to wait for ages while it loads.
I have tried other portfolio plugins and they are much faster… but I like to use X portfolio, so what Can i do to speed this up, without having to make all images so small that it defies the point.
Thanks for your help.April 20, 2016 at 11:04 am #892075
John EzraMemberHi there,
Thanks for writing in and for your support for X. You can compress image file size by optimizing images instead of reducing it’s resolutions size. There are plugins for this you can search or you can use tools to optimize your images. Personally I use Photoshop’s save for web or export option. However, an online tool I have used in the past though is https://kraken.io/web-interface. You can give that a try.
Let us know how that goes. Hope this helps – thanks!
April 21, 2016 at 1:39 am #893124
christiaan pParticipantHi, Thanks for the tips, I use photoshop and do optimize for web, I still feel the x portfolio is very sluggish? is there no way to optimize the portfolio from x side? ie. the most optimum amount of rows or amount of items on a page? A function that is also confusing to viewers is , lets say you have 20 items on a page, and you have a bunch of categrories, but you choose a category item that is not on the porti page, then it does not show it to you, just a blank.
unless you go to say page 5 where the images are. and then you click on the category then it will show you only those. Should it not find the category items regardless of on which page you are at? Or should i have 50 items shown on one page, but I am sure the load time of the portfolio will then come to a stand still.
Any help would be great.
thanksApril 21, 2016 at 8:47 am #893639
ZeshanMemberHi Christiaan,
Thanks for writing back!
These image sizes are generated dynamically based on your selected site layout, e.g., your selected stack, boxed layout, site max width, sidebar enabled or disabled and et cetera. This is to ensure your images serve best on all sized devices including the retina.
However, changing it requires custom development. While that is outside the scope of support, I could point you in the right direction with the understanding that it would ultimately be your responsibility to take it from here.
To change the image size of your portfolio items, add following code in your child theme‘s functions.php file:
// Entry Cover Background Image Style - Custom Portfolio Image Size // ============================================================================= add_image_size( 'portfolio-small', 267, 9999, false ); if ( ! function_exists( 'x_ethos_entry_cover_background_image_style' ) ) : function x_ethos_entry_cover_background_image_style() { $featured_image = x_make_protocol_relative( x_get_featured_image_url( 'portfolio-small' ) ); $background_image = ( $featured_image != '' ) ? 'background-image: url(' . $featured_image . ');' : 'background-image: none;'; return $background_image; } endif;I’ve set the width of the image 267px that is the width of your portfolio item. If you want to change it, replace 267 from the code with your desired width in pixels (please exclude ‘px’ as the function only accepts integers). Height will be calculated automatically respecting the aspect ratio of the image.
After the change, don’t forget to regenerate your thumbnails.
Thank you!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-891759 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
