GithubHelp home page GithubHelp logo

dcooney / instant-images Goto Github PK

View Code? Open in Web Editor NEW
39.0 2.0 12.0 19.31 MB

Instantly upload photos from Unsplash, Openverse, Pixabay and Pexels to your website without leaving WordPress.

Home Page: https://getinstantimages.com

License: GNU General Public License v2.0

PHP 24.70% JavaScript 53.23% SCSS 22.07%
unsplash wordpress-plugin unsplash-api instant-images wordpress stock-photos pixabay-api pixabay unsplash-photos pexels

instant-images's Introduction

instant-images's People

Contributors

dcooney avatar dependabot[bot] avatar gregrickaby avatar kzeni avatar mauryaratan avatar tobiasbg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

instant-images's Issues

Thumbnails not showing

Hi,

I'm using Instant Images in combination with WP media folder and with Amazon S3 synchronisation.
https://www.joomunited.com/wordpress-products/wp-media-folder
https://www.joomunited.com/wordpress-products/wp-media-folder/amazon-s3-integration-with-wordpress-media-library

When I add an image with Instant Images, I can use the image without problems but in the media library the thumbnails and previews won't show.
Is this something (a problem) for Instant Images or for WP Media Folder?

Thanks!

Screenshot 2021-12-13 at 11 11 02

Screenshot 2021-12-13 at 11 17 15

Add Hooks and Filters to insert function

It would be great if there were some actions and filters within the import (resize) process.

Those hooks could be used by developers to add additional data to images or to do something after an images was imported from unspash.

Error: Unable to download image to server, please check your server permissions

When I navigate to WordPress Dashboard > Media > Instant Images and click on an image to download it, it shows the downloading icon. After 1-2 seconds the download icon gets replaced by an error icon. On hover the tool-tip says Unable to download image to server, please check your server permissions.

Another thing I noticed is, after I installed the plugin a new directory called instant-images gets created at wp-content/uploads/. In that directory an image file with a random name is created for each download but my system is unable to open it.

Environment details:

  • Windows 10 1709
  • WAMP 3.1 (64 bit)
  • PHP 7.1.9
  • memory_limit = 512M
  • post_max_size = 512M
  • upload_max_filesize = 512M
  • max_execution_time = 3600
  • WordPress 4.9.1
  • WordPress theme: Twenty Seventeen 1.4
  • Instant Images 3.0

Please let me know if you need any other information in order to figure our the issue.

AI Image Support

Hey! We love this tool and it helps massively speed up our image addition process.

Are there any plans to add support for image AI APIs? It'd be awesome if we could add our own API key and grab images from DALL-E

WP Media Integration

Seriously love the plugin, just hate it's location. Your only real competitor is StockPack, and they have a proprietary API. Their interface is no where what yours is, but the location is perfect, right in the WP Media modal. You really should just stick what you have in that model. It would make your plugin 200x more powerful.

Great work, really impressive!

-- Creator of ReduxFramework (WordPress framework)

Match filename to alt text

I noticed that filenames are not very SEO friendly, e.g. they're usually a random collection of letters like - fkwgpzwagqc.jpg

It'd be much better if the filename matched the alt text, but replaced and spaces with '-' e.g. an image selected with alt text 'person feeding baby', would have a filename of 'person-feeding-baby.jpg'.

This would help the plugin better follow best-practices given by Google in this article - https://developers.google.com/search/docs/appearance/google-images

Incompatible With Hard-Coded Calls to wp_editor()

Hi, I really like your plugin, it works great! However my use case is a bit different. I am using wp_editor() on the front and I'd like to get your media button to appear. I was able to achieve this by changing just a couple of lines of code ( admin_enqueue_scripts to wp_enqueue_scripts and removing an is_admin() ), but I'd prefer not to hack your plugin.

What are your thoughts on this?

Add credit for images

Hello and thank you for this plugin.

I like to give credit to the photographer, also if they do not ask for it, so at the end of a post I write:" This image was shot by John"

Would it be possible to have an option that enable "auto-credit"?

It could be done in two different ways: adding that phrase (it has to be customizable) to every image description, or to add the credits at the end of a post.

I hope you like my idea.
Thank you!

improve security check

Hi @dcooney

if ( false !== strpos( $url, $server_ip ) || false !== strpos( $url, $server_name ) ) {

I came across this line because I'm running your plugin on a server where the SERVER_ADDR isn't set at all, that's why downloading resulted in an error.

Please also note that even if provided, the $_SERVER superglobal can be altered e.g. by other plugins, so this check doesn't bring any real security benefit and needs to be improved or left out to avoid more users having trouble.

User which is not admin cannot insert image into post

I really love your plugin.

But I encounter an issue.
To reproduce:

  1. I login as an user which is NOT an admin. (Role is Editor)
  2. I edit a post. (It's my own)
  3. Then I try to insert an image via Instant Images.
  4. Here the error occurs: "Unable to download image to server, please check your server permissions."

It works if I use an user which has the admin role.
Maybe there's a fix or I missed something?

Could openverse also be included?

It would be cool if also openverse would be included here, considering it is wordpress's own provider. Is it this in the roadmap?

"Add Media" doesn't reload after an image is downloaded

I noticed that after downloading an image, I had to close and re-open the Add Media modal to pick up on the new addition. It would be nice if that was automatic.

This code is surely not the ideal way to do it, but it does refresh the Add Media and Create Gallery panels when they are clicked on. I couldn't figure out how to refresh content in a frame that isn't currently visible.

I just added this to initialize() in index.js.

	// Refresh Add Media and Create Gallery panels when we switch to them
	jQuery( ".media-menu>.media-menu-item:lt(2)", parent.document ).off( "click.AnandaStock" ); // Prevent duplicates being added
	jQuery( ".media-menu>.media-menu-item:lt(2)", parent.document ).on( "click.AnandaStock", { wp: parent.window.wp },function( event ) {   
		let wp = event.data.wp;
		wp.media.frame.content.get().collection.props.set({ignore: (+ new Date())});
		wp.media.frame.content.get().options.selection.reset(); 
	});

This plugin is really well made, by the way. Thanks (a lot!) for open-sourcing it.

Turn off services or search by license type

Problem: some open verse images are not licensed for commercial use. Need the ability to either limit the CC licenses searched or turn off services (don’t search Openverse for example).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.