wp_get_original_image_url example

?> <div class="misc-pub-section misc-pub-dimensions"> <?php _e( 'Dimensions:' ); ?> <strong><?php echo $media_dims; ?></strong> </div> <?php     }

    if ( ! empty( $meta['original_image'] ) ) {
        ?> <div class="misc-pub-section misc-pub-original-image word-wrap-break-word"> <?php _e( 'Original image:' ); ?> <a href="<?php echo esc_url( wp_get_original_image_url( $attachment_id ) ); ?>"> <strong><?php echo esc_html( wp_basename( wp_get_original_image_path( $attachment_id ) ) ); ?></strong> </a> </div> <?php     }
}

/** * Parses ID3v2, ID3v1, and getID3 comments to extract usable data. * * @since 3.6.0 * * @param array $metadata An existing array with data. * @param array $data Data supplied by ID3 tags. */
$sizes[ $size ] = array(
                    'height'      => $height,
                    'width'       => $width,
                    'url'         => $base_url . $size_meta['file'],
                    'orientation' => $height > $width ? 'portrait' : 'landscape',
                );
            }
        }

        if ( 'image' === $type ) {
            if ( ! empty( $meta['original_image'] ) ) {
                $response['originalImageURL']  = wp_get_original_image_url( $attachment->ID );
                $response['originalImageName'] = wp_basename( wp_get_original_image_path( $attachment->ID ) );
            }

            $sizes['full'] = array( 'url' => $attachment_url );

            if ( isset( $meta['height']$meta['width'] ) ) {
                $sizes['full']['height']      = $meta['height'];
                $sizes['full']['width']       = $meta['width'];
                $sizes['full']['orientation'] = $meta['height'] > $meta['width'] ? 'portrait' : 'landscape';
            }

            
Home | Imprint | This part of the site doesn't use cookies.