public function get_extension(){
    parent::get_extension();
		if ( !$this->ext2 && $this->file ){
			if ( function_exists('exif_imagetype') ){
				if ( $r = exif_imagetype($this->file) ){
          if ( !array_key_exists($r, bbn\file\image::$allowed_extensions) ){
            $this->ext = false;
          }
				}
				else{
          $this->ext = false;
        }
			}
			if ( $this->ext ){
				$this->ext2 = $this->ext;
				if ( $this->ext2 === 'jpg' ){
          $this->ext2 = 'jpeg';
        }
			}
		}
		return $this->ext;
	}
public function get_extension(){
    parent::get_extension();
		if ( !$this->ext2 && $this->file ){
			if ( function_exists('exif_imagetype') ){
				if ( $r = exif_imagetype($this->file) ){
          if ( !array_key_exists($r, bbn\file\image::$allowed_extensions) ){
            $this->ext = false;
          }
				}
				else{
          $this->ext = false;
        }
			}
			if ( $this->ext ){
				$this->ext2 = $this->ext;
				if ( $this->ext2 === 'jpg' ){
          $this->ext2 = 'jpeg';
        }
			}
		}
		return $this->ext;
	}
public function get_extension ( ) { parent :: get_extension ( ) ; if ( ! $ this -> ext2 && $ this -> file ) { if ( function_exists ( 'exif_imagetype' ) ) { if ( $ r = exif_imagetype ( $ this -> file ) ) { if ( ! array_key_exists ( $ r , bbn \ file \ image :: $ allowed_extensions ) ) { $ this -> ext = false ; } } else { $ this -> ext = false ; } } if ( $ this -> ext ) { $ this -> ext2 = $ this -> ext ; if ( $ this -> ext2 === 'jpg' ) { $ this -> ext2 = 'jpeg' ; } } } return $ this -> ext ; }
Returns the extension of the image. If the file has jpg extension will return 'jpeg'.

```php
$img = new bbn\file\image("/home/data/test/image.jpg");
bbn\x::dump($img->get_extension());
// (string) "jpeg"
```

@return string
Returns the extension of the image . If the file has jpg extension will return jpeg .