How to echo image width and height for raw image field value?

More
3 years 3 weeks ago #80609 by iamrobert
Hi,

I have a gallery that I am using scale resize for - so I am trying to work out how to generate width height.
Code:
$fvals = $item->fieldvalues[138];     $lightGallery = $item->fields['gallery_2021']; $largePic = $lightGallery->thumbs_src['large']; $originalPic = $lightGallery->thumbs_src['original']; $mediumPic = $lightGallery->thumbs_src['medium']; $smallPic = $lightGallery->thumbs_src['small'];       for ($i = 0; $i < count($largePic); $i++) : $v = JArrayHelper::getValue($fvals, $i); if ( @unserialize($v)!== false || $v=== 'b:0;' ) $v = unserialize($v);

echo '<pre>' . print_r($v, true) . '</pre>';

Doesn't contain width or height.

Where can I pull the width and height from?
 

Please Log in or Create an account to join the conversation.

More
3 years 3 weeks ago #80613 by micker
i think you can check image plugin output to find the code

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
3 years 3 weeks ago #80632 by iamrobert
I couldn't find a FLEXIContent solution - so I reverted to php:
Code:
    list( $lsource_w, $lsource_h ) = getimagesize( JURI::base() . $thumbPic[ $i ] );     $imgDims = 'width="' . $lsource_w . '" height="' . $lsource_h . '" ';

I used Glightbox Lightbox  to create the lightbox in item.php. The final code is here:

gist.github.com/iamrobert/b2f38a05d6800b6e9e92d4d660a1398e
 

Please Log in or Create an account to join the conversation.

More
3 years 3 weeks ago #80633 by micker
Cool why tout didnt create a field template for this ?
After propose an pr and WE Can add it in flexicontent

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
3 years 3 weeks ago #80635 by iamrobert
IMHO, FLEXIcontent just needs to start charging money for people to use it not add more features. 

Unfortunately, I'm not sure how I could implement it with FLEXIcontent as my templates are custom. It doesn't fit in with the Joomla ecosystem.

At the moment, I'm not using bootstrap or jQuery anymore. I've been exploring CodyHouse  as a base and the code isn't licensed to share. 

Plus, you need to be able to go in and edit the PHP to insert the field values.

Plus I just got ideas from:
github.com/Lyquix/flexicontent_templates


 

Please Log in or Create an account to join the conversation.

More
3 years 3 weeks ago #80636 by micker
ok cool
for next flexicontent version ... we study to move to bs5 (joomla inside) or remove library for direct css ... difficult choice ...

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.304 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline