2

I am using Visual Composer / WPBackery to display a "services-image" block on my page. Visual Composer or my theme seems to be using the class="attachment-large size-large" by default which is causing my images to be larger than what is required.

A recent test on GTMetrix showed The following images are resized in HTML or CSS. Serving scaled images could save 226.2KiB

I would like to edit the Visual Composer plugin or the theme files in order to use the class="attachment-small size-small"

This is what is shown on my page:

<div class="wpb_column vc_column_container vc_col-sm-4"><div class="vc_column-inner"><div class="wpb_wrapper">
<figure class="wpb_content_element overlay-info no-mask ">
<img width="768" height="512" src="http://rdz.nzl.mybluehost.me/wp-content/uploads/2020/02/YOUR-EXPERIENCE-1024x683.jpg" class="attachment-large size-large" alt="">

<figcaption class="d-flex">
<div class="align-self-center mx-auto">
<h4 class="mb-0 text-uppercase letterspace-4">YOUR EXPERIENCE</h4>
</div>
</figcaption>
</figure>
<div class="wpb_text_column wpb_content_element ">
<div class="wpb_wrapper">
<p style="text-align: center;">More than anything, I aspire to enhance your experience.<br>
I do that by having fun with you.<br>
It is the single most important aspect of your day.</p>
</div>
</div>
</div></div></div>

the image being used is http://rdz.nzl.mybluehost.me/wp-content/uploads/2020/02/YOUR-EXPERIENCE-1024x683.jpg I would like to use the optimized /resized version of this image instead.

Please assist me in where I can change the default image attachment class which Visual Composer / WPBackery uses?

Thank you

ultramel1987
  • 91
  • 2
  • 11
  • When you insert the image into the post, you should be able to select the size from a drop down. – disinfor Feb 19 '20 at 21:48
  • @disinfor I have seen that option with a few other VC elements, however not this one, it doesn't show the dropdown for thumbnail, medium etc. the element also doesn't have the usual "image size" field in which you can insert a custom size, or input thumbnail / medium or large – ultramel1987 Feb 19 '20 at 21:54

0 Answers0