Jump to content

Image Sizer options setting quality of image


Pravin
 Share

Recommended Posts

<!--Content with Image left-->
<?php 
    $i = 2;
    foreach($page->page_content as $each) {
    if( $i%2 == 0 ){ 
?>
   <section class="imageblock about-1">
          <div class="imageblock__content col-md-6 col-sm-4 pos-left animated fadeInLeft">
              <div class="background-image-holder">

                   <?php  
                   $option1 = array(
                                    'quality' => 60,
                                    'upscaling' => true,
                                    'cropping' => true,
                                    );

                   $pravin= $each->single_image->size(790,650,$option1); ?>
                   <img alt="image" src="<?php echo $pravin->url; ?>" />
              </div>
          </div>
                  <div class="container container-body">
                      <div class="row">
                          <div class="col-md-5 col-md-push-7 col-sm-8 col-sm-push-4 animated fadeInUp">
                              <?php echo $each->body; ?>
                          </div>
                      </div>
                      <!--end of row-->
                  </div>
                  <!--end of container-->
     
   </section>
<!--Content with Image on left-->

   <?php } else { ?>
<!--Content with Image on right-->
     <section class="imageblock about-1">
                <div class="imageblock__content col-md-6 col-sm-4 pos-right animated fadeInRight">
                    <div class="background-image-holder">
                    <?php $pravin= $each->single_image->size(790,650,$option1); ?>
                   <img alt="image" src="<?php echo $pravin->url; ?>" />
                    </div>
                </div>
                <div class="container container-body">
                    <div class="row">
                        <div class="col-md-5 col-sm-8 animated fadeInUp">
                            <?php echo $each->body; ?>
                        </div>
                    </div>
                    <!--end of row-->
                </div>
                <!--end of container-->
     </section>
  <?php } 
              ++$i;
              }         ?>
   
<!--Content with Image on right-->

How to set the image quality as per desired..

I tried using the above code but I get the original image size..

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...