Comments (9)
The metadata mentioned in the documentation are Doctrine metadata, not image metadata.
How do you perform the image rotation?
from vichuploaderbundle.
I've open my picture with the default photo app of my computer, and I have rotate the image with it and save it.
This action modify the image ['Orientation'] parameter
from vichuploaderbundle.
So does the image have the metadata after this operation?
If you try to do a manual image upload with a simple PHP script, do you get the same metadata loss?
from vichuploaderbundle.
Okay, I can describe more with an example.
Firstly, I download or I take a picture
At this moment, the metadatas of the picture are :
array(7) {
["FileName"]=>
string(11) "classic.jpg"
["FileDateTime"]=>
int(1711023627)
["FileSize"]=>
int(8620)
["FileType"]=>
int(2)
["MimeType"]=>
string(10) "image/jpeg"
["SectionsFound"]=>
string(0) ""
["COMPUTED"]=>
array(4) {
["html"]=>
string(24) "width="244" height="207""
["Height"]=>
int(207)
["Width"]=>
int(244)
["IsColor"]=>
int(1)
}
}
I rotate it with windows and I save it
At this moment, the metadatas of the picture are :
array(9) {
["FileName"]=>
string(12) "original.jpg"
["FileDateTime"]=>
int(1711527777)
["FileSize"]=>
int(13668)
["FileType"]=>
int(2)
["MimeType"]=>
string(10) "image/jpeg"
["SectionsFound"]=>
string(24) "ANY_TAG, IFD0, THUMBNAIL"
["COMPUTED"]=>
array(7) {
["html"]=>
string(24) "width="244" height="207""
["Height"]=>
int(207)
["Width"]=>
int(244)
["IsColor"]=>
int(1)
["ByteOrderMotorola"]=>
int(1)
["Thumbnail.FileType"]=>
int(2)
["Thumbnail.MimeType"]=>
string(10) "image/jpeg"
}
["Orientation"]=>
int(3)
["THUMBNAIL"]=>
array(6) {
["Compression"]=>
int(6)
["XResolution"]=>
string(4) "96/1"
["YResolution"]=>
string(4) "96/1"
["ResolutionUnit"]=>
int(2)
["JPEGInterchangeFormat"]=>
int(120)
["JPEGInterchangeFormatLength"]=>
int(4914)
}
}
I upload it in my app with Vich Uploader and the result is :
At this moment, the metadatas of the picture are :
array(7) {
["FileName"]=>
string(26) "660412264d5d7087015010.jpg"
["FileDateTime"]=>
int(1711542822)
["FileSize"]=>
int(7072)
["FileType"]=>
int(2)
["MimeType"]=>
string(10) "image/jpeg"
["SectionsFound"]=>
string(0) ""
["COMPUTED"]=>
array(4) {
["html"]=>
string(24) "width="244" height="207""
["Height"]=>
int(207)
["Width"]=>
int(244)
["IsColor"]=>
int(1)
}
}
So, the file is not realy impacted by this modification, but the metadatas change. It seems that VichUploader deletes these metadatas, which has the effect of removing this defined orientation because the image is not originally upside down.
from vichuploaderbundle.
I'm not aware of any metadata handling here.
I invite you again to try uploading a file without this bundle and checking the outcome.
from vichuploaderbundle.
I found the origin of my problem, it's on our side, sorry for the inconvenience.
from vichuploaderbundle.
@Mgt03 any hint what it was on your side? Possibly it can help me too.
from vichuploaderbundle.
Hi @bresam,
I don't think this is really helpful for you, but this problem was due to an optimization function in my image, where I explicitly remove all metadata from the image I loaded.
So no link to the Vich Bundle
After deleting this part of my code, it works perfectly.
from vichuploaderbundle.
@Mgt03 Thank you anyway. Found the issue in a Post Upload Event Listener where we did something similar 👍
from vichuploaderbundle.
Related Issues (20)
- Problem during reading with flysystem HOT 4
- Invalid Schema error while installing the bundle on Symfony 7 HOT 1
- The option "required" does not exist ? HOT 3
- Installation instructions are outdated HOT 2
- Document how to get s3 URL HOT 2
- Issue with VichUploader: unsupported MIME type "image/jpeg" HOT 7
- Install dose not register in bundle.php HOT 1
- Problem with delete when using multiple mappings on one entity HOT 1
- Using pure Annotation Does not Upload the actual file. @Vich\UploadableField HOT 3
- File injection on load not working reliabely with lazy ghost objects
- The attribute reader should not trigger an exception for other attributes HOT 3
- Form type lazy load support HOT 3
- publicUrl method check looks for wrong exception.
- Autowire services that implement NamerInterface HOT 3
- Logging of storage operations HOT 7
- Define default upload destination HOT 2
- Files ALWAYS gets downloaded even if `Content-Disposition` is set to `inline` HOT 8
- Build is broken HOT 1
- Capture HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vichuploaderbundle.