Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow exif data of images to be read from server #1374

Closed
kartik-v opened this issue Mar 21, 2019 · 1 comment
Closed

Allow exif data of images to be read from server #1374

kartik-v opened this issue Mar 21, 2019 · 1 comment

Comments

@kartik-v
Copy link
Owner

kartik-v commented Mar 21, 2019

initialPreviewConfig will now read an additional property exif that will get the exif object containing the exif properties for each uploaded image. This will be used by the plugin to auto detect and orient the image preview.

An example of PHP server code as used in ajax demo 6 that will return the JSON config to the plugin after upload:

$img1 = '/uploads/images/image-01.jpg';
$img2 = '/uploads/images/image-02.jpg';
return json_encode([
    'initialPreview' => [$img1, $img2],
    'initialPreviewConfig' => [
        ['caption' => 'Image 01.jpg', 'size' => 139823, 'key' => 1, 'exif' => exif_read_data($img1)],
        ['caption' => 'Image 02.jpg', 'size' => 339649, 'key' => 2, 'exif' => exif_read_data($img2)],
    ]
]);
@kartik-v kartik-v changed the title Allow exif data of images to be passed from server Allow exif data of images to be read from server Mar 21, 2019
@kartik-v kartik-v added this to the 5.0.0 milestone Mar 21, 2019
@kartik-v
Copy link
Owner Author

Resolved via this major upgrade to release v5.0.0 well ahead of time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant