• Resolved chrismacleavy

    (@chrismacleavy)


    Hi Ben,

    I’m thinking about signing up to use the Pexels API (I THINK that part of the benefit would be that I could link to images where they are on the Pexels server, rather than storing them locally and using up all my server space.

    Do you think this is something that could be fairly painlessly? Key word: painlessly. If you look into it (or you know about it already) and deem it too much effort, I’m happy with a no.

    Just thought I’d ask ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author Ben Sibley

    (@bensibley)

    Hey Chris,

    I think the API is better used for integrating images into products. For instance, if you had your own site creation tool and wanted to provide your users with free images, you could source them from Pexels via their API.

    To use their images without loading them on your server is called “hotlinking.” You can insert images in WordPress posts via URL and use the URL of an image on their site instead of uploading to your Media Library. However, hotlinking is generally frowned upon. Some people view it as unethical since you’re eating up someone else’s resources without their permission.

    If the issue is server space, then you could potentially use a platform like Google Photos (or Google Drive) that is designed to provide users with image storage and then hotlink from there.

    • This reply was modified 5 years, 9 months ago by Ben Sibley.
    Thread Starter chrismacleavy

    (@chrismacleavy)

    Hi Ben,

    Thanks for your thoughts: exactly what I was after.

    The API doc can be found here: https://www.pexels.com/api/documentation/

    It looks to me like hotlinking is exactly what it does, with the below provided line:

    https://api.pexels.com/v1/photos/:id
    (Insert an exact photo using its ID).

    Is this practical to use for post feature images (I’m pretty sure you can specify dimensions), including acknowledgement of the author as the API requires?

    Again, happy with a ‘no’ if it’s a lot of work.

    Theme Author Ben Sibley

    (@bensibley)

    I would recommend using the Featured Image from URL plugin instead. If hotlinking is okay with them as long as you provide a source then that plugin provides a simple way to add Featured Images via the URL.

    Using the API would be much more work. You need to format the API requests like this using PHP and then write more code to integrate that with the WP post editor so you have an option in the interface to select the image you want to get.

    Thread Starter chrismacleavy

    (@chrismacleavy)

    Good answer, my friend. That tells me what I need to know.

    I’ll stick to what I’ve got ( it’s working well, I’m just always considering tweaks when I come across them).

    Thanks again.

    Theme Author Ben Sibley

    (@bensibley)

    Always happy to help ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Pexels API’ is closed to new replies.