We’re using the file name filter successfully now and it’s going great. I had a couple other ideas of things that would be helpful for us if you feel inclined to add them.
Does StockPack have a filter/hook to customize the file name? I looked at the documentation and didn’t see one.
We’re finding that a lot of the time the default file name is super long and we’d like to automate truncating it ourselves in PHP (vs. having our content editors have to do it manually).
Our thought would be to truncate the file name part to no more than 100 characters and then add “-stockpack-“, the provider name, and the media file id for uniqueness (stockpack_media_id). Basically, something like “a-picture-of-a-cat-stockpack-adobe-stock-1930493”.
So, some kind of filter/hook that provides the generated name, the stock photo provider, and the stockpack_media_id as parameters somehow would be super helpful!
]]>As of yesterday, we keep having issues with our connection to Adobe Stock. We usually only have to refresh the connection every couple weeks.
Now, we keep getting the error message every couple hours even after reconnecting. Has something changed? Right after reconnecting it, people can license images, but after a few hours, it stops working.
The error message is:
Please reconnect the account on StockPack, the permissions have expired. Go the providers page on stockpack.co/providers
]]>Hi,
I wonder if there is an utility for that function and if there is… it should be smarter as it is loading on every page view even those who has no media uploader.
I noticed because I have a website with 20000+ images and when monitoring, this query shows up way too often.
SELECT?DISTINCT?YEAR( post_date )?AS?year, MONTH( post_date )?AS?month
FROM?wp_posts
WHERE?post_type = ‘attachment’
ORDER?BY?post_date?DESC
It is triggered on the wp_enqueue_media() of admin_enqueue_scripts in class.settings-api.php.
I don’t see why you would enqueue the media uploader. By definition, in every instance that Stockpack would be triggered, it would already be loaded.
I have used this code to disable it and Stockpack is still working fine.
add_action('admin_init', function () {
if (class_exists('StockpackAdmin')) {
$stockpack_admin = StockpackAdmin::get_instance();
if (isset($stockpack_admin->settings_api)) {
remove_action('admin_enqueue_scripts', array($stockpack_admin->settings_api, 'admin_enqueue_scripts'));
}
}
}, 999);
Let me know what you think about this.
Best regards
]]>Hi, I would like to set “Adobe Stock” as the default provider in order to not switch the provider everyt time I search for images. In order to achive this, I disabled all providers except for Adobe but still it uses Pexels as default provider. How can I fix this? Thank you!
]]>Hi!
With the latest version and PHP 8.1 I get a critical error with your plugin, and I think it’s connected to Hyyan WooCommerce Polylang Integration.
Everything works fine when I uninstall StockPack.
I really like StockPack, so is there any way this can be fixed?
Thanks : )
Here’s some info:
`== Server Environment ==
Operating System: Linux
Software: Apache/2
MySQL version: MariaDB Server v10.5.17
PHP Version: 8.1.12
PHP Memory Limit: 128M
PHP Max Input Vars: 1000
PHP Max Post Size: 64M
GD Installed: Yes
ZIP Installed: Yes
Write Permissions: All right
== WordPress Environment ==
Version: 6.1.1
WP Multisite: No
Max Upload Size: 64 MB
Memory limit: 512M
Max Memory limit: 512M
Permalink Structure: /%year%/%monthnum%/%day%/%postname%/
== Theme ==
Name: Hello Elementor Child
Version: 1.0.0
Author: Elementor Team
Child Theme: Yes
Parent Theme Name: Hello Elementor
Parent Theme Version: 2.6.1
Parent Theme Author: Elementor Team
== Active Plugins ==
Classic Editor
Version: 1.6.2
Author: WordPress Contributors
Dashboard Welcome for Elementor
Version: 1.0.6
Author: IdeaBox Creations
Elementor
Version: 3.8.1
Author: Elementor.com
Elementor Pro
Version: 3.8.1
Author: Elementor.com
Hyyan WooCommerce Polylang Integration
Version: 1.5.0
Author: Hyyan Abo Fakher
Klarna Checkout for WooCommerce
Version: 2.8.7
Author: Krokedil
Polylang
Version: 3.2.8
Author: WP SYNTEX
Polylang Connect for Elementor
Version: 2.3.3
Author: Creame
Premmerce Permalink Manager for WooCommerce
Version: 2.3.7
Author: premmerce
Smush
Version: 3.12.4
Author: WPMU DEV
WooCommerce
Version: 7.1.0
Author: Automattic
WooCommerce PayPal Payments
Version: 1.9.5
Author: WooCommerce
Woo Discount Rules
Version: 2.5.2
Author: Flycart
Woo Discount Rules PRO 2.0
Version: 2.5.2
Author: Flycart
WPS Hide Login
Version: 1.9.6
Author: WPServeur, NicolasKulka, wpformation
WPS Limit Login
Version: 1.5.6
Author: WPServeur, NicolasKulka, wpformation
Yoast SEO
Version: 19.10
Author: Team Yoast
I recently did an optimization pass on our sites, and after profiling them found that several plugins with local composer /vendor builds were not fully optimized for production, StockPack being in this list.
The plugin’s local composer build is not built with –classmap-authoritative, and by default the composer ClassLoader will prepend itself to the list of autoloaders. Both of these issues combined can cause thousands of needless file lookups for classes flowing through this loader that it doesn’t need to handle. When not built with –classmap-authoritative and a class isn’t found in the local classmap, then composer makes a few fallback attempts to find the class, resulting in all the needless file lookups and a performance hit.
Here’s a link to a github issue I opened for another plugin with the same issue, for some further details: https://github.com/ampproject/amp-wp/issues/7337
]]>Openverse would be a great addition: https://www.ads-software.com/openverse/
API documentation: https://api.openverse.engineering/v1/
]]>Thank you for a great plugin, I use it everyday.
I am wondering is there a way to set a default image provider? I want to make unsplash the default.
Also it would be good if you could make the plugin mobile friendly, the UI for searching images does not work very well on mobile.
Thanks
]]>Hi there, I see the tab in the media library, but when I click it, nothing happens… just hangs.
]]>Hey. I wonder how I can translate caption “Photo by” to different language? I tried loco translator but It doesn’t work. I even search for “Photo by” in plugin’s files and replace it but I still have “photo by” caption.
Any idea how to change that?
]]>please add a file compressor. that plugin is great but having picutres larger than 300/400 MB for a blog post is not SEO friendly at all
i d love to use this plugin unfortunately, I prefer ranking and spending time to optimizing images one by one
]]>Author-level users can view /wp-admin/options-general.php?page=stockpack
and the license key is not hidden/secret
Is there a way to pull in free stock illustrations from sites like freepik?
]]>I am writing to report an odd bug in which the installed and activated plugin does not show the search field unless another plugin of the same kind is both installed AND activated.
DETAILS
I installed Stockpack and Instant Images to test both for ease of access to and placement of Unsplash stock images. Stockpack was the more attractive plugin, because of its additional access to Pixabay, Getty, and others. However, after installing and activating Stockpack, I tried to simply add a featured image to a post. While the media window that popped up did include a tab for Stockpack, there was no search box, even after refreshing the window.
I then decided to install and activate Instant Images. Because I hadn’t uninstalled nor deactivated Stockpack, the tab was still there. AND THIS TIME WITH A SEARCH BOX! But once I deactivated Instant Images (thinking the Stockpack issue had fixed itself), the Stockpack search box disappeared with it. Reactivating Instant Images gave me access to both again.
]]>Helllo, I can’t change the default image provider from adobe to something else, I remember the option being available, where is it now?
]]>“.jpg” gets added to the end of all titles, whether the default or a custom title. It gets added to the permalink as well as “#main” coming through as well.
Screenshot: https://share.getcloudapp.com/kpuDQ2jO
]]>I connected multiple providers and all I tried worked except Deposit Photos, saying “No images have been found”
Screenshot: https://share.getcloudapp.com/GGuWxRqq
Notes:
– it shows Pixabay (somehow got set as my Default), not Deposit Photos, and this might point to the issue
– the “Provider” label above the drop-down has a styling bug
– providers I did not connect/enable are still showing in the drop-down
– the Default (Pixabay in my case) is displayed as the first option but then Pixabay is displayed below as a separate option as well
Hopefully this feedback can help improve the service as well as the UI.
tyvm for your efforts.
]]>Installing this plugin to my own site, I know when an image is worth a premium download.
Installing to a client site or a multi-author site, it’d be important to me that Editors and Admins get the “access all connected sources” token but lower role users would only get stock sites A, B, and D.
]]>If I connect/enable more than one provider, why not let me search them all at once? I don’t want to have to perform multiple searches multiple times (once per provider) to find the best image.
This functionality is what I thought this plugin did by default and not having it is disappointing enough to not want to use it.
]]>I’d like to see a “search for images” (or similarly named) button alongside “Select Files” button at the /wp-admin/media-new.php
admin screen.
I want to find some generic images, not having them attached to a specific post.
]]>Feature request: Please support specific folder(s) (recursive) from Google Drive, also Google Photos (specific albums)
]]>underscore.min.js?ver=1.8.3:2 Uncaught TypeError: Cannot read property ‘replace’ of undefined
at Function.v.template (underscore.min.js?ver=1.8.3:2)
at n.template (wp-util.min.js?ver=5.7.1:2)
at n.render (wp-backbone.min.js?ver=5.7.1:2)
at n.updateProvider (stockpack-load-admin.js?ver=3.2.4:1)
at n.initialize (stockpack-load-admin.js?ver=3.2.4:1)
at n.h.View (backbone.min.js?ver=1.4.0:2)
at n.constructor (wp-backbone.min.js?ver=5.7.1:2)
at n.constructor (media-views.min.js?ver=5.7.1:2)
at new n (backbone.min.js?ver=1.4.0:2)
at n.addToolbarFilters (stockpack-load-admin.js?ver=3.2.4:1)
Hi,
I would to buy a license for my websites on my multisite network, but I dont want to have to enter the token manually on every subsite.
How can I automatically add the token to all subsites on the network?
]]>Hello @ionutcalara,
AS the title says, I wonder if you had a chance to test out StockPack on a multisite installation… I would hate to be the first guinea pig!
Thanks
]]>Hi there, hitting a stumbling block when attempting to load the plugin on the front end or via admin columns inline edit (plugin works as expected on a standard post edit screen). We use ACF to load our image fields:
Uncaught TypeError: Cannot read property 'innerText' of undefined
at constructor.<anonymous> (?gui-live-edit=1&post-id=20198&fields=g_content_rows&row-id=row-1&ts=1615903356&sadfsd=1412m1241:812)
at p (backbone.min.js?ver=1.4.0:2)
at f (backbone.min.js?ver=1.4.0:2)
at l (backbone.min.js?ver=1.4.0:2)
at i.n.trigger (backbone.min.js?ver=1.4.0:2)
at i.propagate (media-views.min.js?ver=5.5.3:2)
at i.open (media-views.min.js?ver=5.5.3:2)
at i.open (script.js?ver=5.3.15:352)
at i.open (assign_image_folder_tree.js?ver=5.3.15:442)
at i.<computed> [as open] (media-views.min.js?ver=5.5.3:2)
]]>
Hello,
Thank you for making this great plugin! Just discovered recently and so far easy setup and fast loads.
One question: Is there a way to filter orientation yet? Landscape or Portrait.
Thank you for checking.
All the best,
Samantha
Hi, does this plugin allow to embed images on post/page or featured image tab using a url or shortcode instead of downloading it to the image library to save server space?
]]>I’m getting this error after I click “download”
An error occurred in the upload. Please try again later.
I have the following plugins installed
– Disable “BIG image” Threshold
– Resize Image After Upload
I have a german website and use the german description from Pixabay:
But the import language is english. Can I change the language?
]]>