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

attachment images bugs #18

Open
bobbravo2 opened this issue Oct 23, 2013 · 1 comment
Open

attachment images bugs #18

bobbravo2 opened this issue Oct 23, 2013 · 1 comment

Comments

@bobbravo2
Copy link

Inside of the /models/attachment.php file, there is a lack of WordPress API usage - for instance using getimagesize & file_exists should probably not be used for performance, as WordPress stores that info in the attachment meta database.

Basically - the issue I'm having is very hard to debug based on the number of conditionals inside of JSON_API_Attachment::query_images()
Is the API not returning any images because the size php reports is different from what WordPress has stored? Is it because the webserver can't find the file path? Is the file path it's checking correct?

I'm left with a broken homepage because the API isn't returning any images, just an empty array.

@bobbravo2
Copy link
Author

Apparently this issue has been fixed @master. Just cloned & checked out to try to fix the bug to make a pull request, and all of the changes I'd recommend were already done.

nikolaik added a commit to nikolaik/wp-json-api that referenced this issue Jan 12, 2014
Removes unnecessary file system checks, should improve performance and help with dphiffer#18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant