{"action":"closed","issue":{"url":"https://api.github.com/repos/devgeniem/wp-sanitize-accented-uploads/issues/3","repository_url":"https://api.github.com/repos/devgeniem/wp-sanitize-accented-uploads","labels_url":"https://api.github.com/repos/devgeniem/wp-sanitize-accented-uploads/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/devgeniem/wp-sanitize-accented-uploads/issues/3/comments","events_url":"https://api.github.com/repos/devgeniem/wp-sanitize-accented-uploads/issues/3/events","html_url":"https://github.com/devgeniem/wp-sanitize-accented-uploads/issues/3","id":146534757,"number":3,"title":"Metadata values for uploads are replaced incorrectly","user":{"login":"onnimonni","id":5691777,"avatar_url":"https://avatars.githubusercontent.com/u/5691777?v=3","gravatar_id":"","url":"https://api.github.com/users/onnimonni","html_url":"https://github.com/onnimonni","followers_url":"https://api.github.com/users/onnimonni/followers","following_url":"https://api.github.com/users/onnimonni/following{/other_user}","gists_url":"https://api.github.com/users/onnimonni/gists{/gist_id}","starred_url":"https://api.github.com/users/onnimonni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onnimonni/subscriptions","organizations_url":"https://api.github.com/users/onnimonni/orgs","repos_url":"https://api.github.com/users/onnimonni/repos","events_url":"https://api.github.com/users/onnimonni/events{/privacy}","received_events_url":"https://api.github.com/users/onnimonni/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-07T07:37:17Z","updated_at":"2016-04-07T08:24:01Z","closed_at":"2016-04-07T08:24:01Z","body":"`$ wp sanitize all` will change the metadata of your files incorrectly in some cases.\r\n\r\nHere's example of metadata from my site:\r\n```\r\nwp eval \"var_dump(wp_get_attachment_metadata(9));\"\r\narray(5) {\r\n  [\"width\"]=>\r\n  int(418)\r\n  [\"height\"]=>\r\n  int(280)\r\n  [\"file\"]=>\r\n  string(17) \"2014/11/test1.jpg\"\r\n  [\"sizes\"]=>\r\n  array(5) {\r\n    [\"thumbnail\"]=>\r\n    array(4) {\r\n      [\"file\"]=>\r\n      string(17) \"test1-150x150.jpg\"\r\n      [\"width\"]=>\r\n      int(150)\r\n      [\"height\"]=>\r\n      int(150)\r\n      [\"mime-type\"]=>\r\n      string(10) \"image/jpeg\"\r\n    }\r\n    [\"medium\"]=>\r\n    array(4) {\r\n      [\"file\"]=>\r\n      string(17) \"test1-280x160.jpg\"\r\n      [\"width\"]=>\r\n      int(280)\r\n      [\"height\"]=>\r\n      int(160)\r\n      [\"mime-type\"]=>\r\n      string(10) \"image/jpeg\"\r\n    }\r\n    [\"small\"]=>\r\n    array(4) {\r\n      [\"file\"]=>\r\n      string(16) \"test1-107x75.jpg\"\r\n      [\"width\"]=>\r\n      int(107)\r\n      [\"height\"]=>\r\n      int(75)\r\n      [\"mime-type\"]=>\r\n      string(10) \"image/jpeg\"\r\n    }\r\n    [\"map-img\"]=>\r\n    array(4) {\r\n      [\"file\"]=>\r\n      string(17) \"test1-152x108.jpg\"\r\n      [\"width\"]=>\r\n      int(152)\r\n      [\"height\"]=>\r\n      int(108)\r\n      [\"mime-type\"]=>\r\n      string(10) \"image/jpeg\"\r\n    }\r\n    [\"custom-size\"]=>\r\n    array(4) {\r\n      [\"file\"]=>\r\n      string(17) \"test1-418x200.jpg\"\r\n      [\"width\"]=>\r\n      int(418)\r\n      [\"height\"]=>\r\n      int(200)\r\n      [\"mime-type\"]=>\r\n      string(10) \"image/jpeg\"\r\n    }\r\n  }\r\n  [\"image_meta\"]=>\r\n  array(11) {\r\n    [\"aperture\"]=>\r\n    int(0)\r\n    [\"credit\"]=>\r\n    string(0) \"\"\r\n    [\"camera\"]=>\r\n    string(0) \"\"\r\n    [\"caption\"]=>\r\n    string(0) \"\"\r\n    [\"created_timestamp\"]=>\r\n    int(0)\r\n    [\"copyright\"]=>\r\n    string(0) \"\"\r\n    [\"focal_length\"]=>\r\n    int(0)\r\n    [\"iso\"]=>\r\n    int(0)\r\n    [\"shutter_speed\"]=>\r\n    int(0)\r\n    [\"title\"]=>\r\n    string(0) \"\"\r\n    [\"orientation\"]=>\r\n    int(1)\r\n  }\r\n}\r\n```"}}