I am generating zoom, thumbnail, and preview images for some images. Some images are saved without their extension. When I am displaying in the image gallery, images without extension are not zooming. This is because the lightbox which we are using is expecting a .jpg extension for images. So the images are not zooming when clicking on it. Zooming on images with the extension are ok.
For this I am appending the .jpg extension like the code below, but it is not working.
<?php foreach($images as $line):
$image_info = pathinfo($line['big']->filename);
$zoom_file = $line['big']->filename."?ext=.jpg";
$zoom_file = $line['big']->filename;
<a href="<?php echo $media_cdn.$zoom_file?>">
<img src="<?php echo $media_cdn.$line['normal']->filename ?>"
width = "200px" alt="image" />