Czy kiedykolwiek próbowałeś zastąpić obrazek, który przesłałeś w WordPressie? Jeśli tak, to prawdopodobnie musiałeś przesłać nowy plik, zmienić jego nazwę i wstawić go do wpisu, jednocześnie zastępując stary plik. Czy nie byłoby miło, gdybyś mógł zrobić to wszystko za pomocą kilku kliknięć? W tym artykule pokażemy, jak łatwo zastąpić pliki załączników w WordPress.
Film poradnik
Jeśli nie podoba Ci się film lub potrzebujesz więcej instrukcji, czytaj dalej.
Pierwszą rzeczą, którą musisz zrobić, to zainstalować i włączyć wtyczkę Enable Media Replace. Po włączaniu działa ona od razu po wyjęciu z pudełka i nie ma żadnych ustawień do skonfigurowania.
Wszystko, co musisz zrobić, to przejść na Media ” Library w twoim obszarze administracyjnym WordPress. Jeśli korzystasz z widoku siatki, musisz przełączyć się na widok listy.
Teraz zlokalizuj plik, który chcesz zastąpić. Gdy już znajdziesz plik, zbliż swój kursor myszy do jego nazwy, a zobaczysz odnośnik „Replace Media”.
Kliknięcie odnośnika spowoduje przejście do strony zastępowania multimediów. Tam musisz przesłać twój nowy plik, klikając przycisk Wybierz plik.
Po wybraniu pliku masz do wyboru dwie opcje. Możesz wybrać tylko zastąpienie pliku lub zastąpienie pliku, użycie nowej nazwy pliku i zaktualizowanie wszystkich odnośników wskazujących na stary plik.
Po wybraniu jednej z opcji wystarczy nacisnąć przycisk przesyłania.
WordPress prześle teraz twój plik multimedialny, a wtyczka zastąpi stary plik multimedialny. Jeśli zdecydowałeś się użyć nowej nazwy pliku i zaktualizować odnośniki, wtyczka również się tym zajmie.
Możesz teraz przejść na twoje wpisy lub strony, na których miałeś załączony ten plik multimedialny i zobaczyć, że został on zastąpiony nowym, właśnie przesłanym plikiem.
Mamy nadzieję, że ten artykuł pomógł ci znaleźć łatwiejszy sposób na zastąpienie załączonych plików w WordPress.
Jeśli chcesz tylko zmienić nazwy plików multimedialnych, możesz zapoznać się z naszym poradnikiem na temat łatwej zmiany nazw obrazków i plików multimedialnych w WordPress.
Jeśli podobał Ci się ten artykuł, zasubskrybuj nasz kanał YouTube, aby zobaczyć poradniki dotyczące filmów WordPress. Możesz nas również znaleźć na Twitterze i Google+.
Syed Balkhi says
Hey WPBeginner readers,
Did you know you can win exciting prizes by commenting on WPBeginner?
Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
You can get more details about the contest from here.
Start sharing your thoughts below to stand a chance to win!
Daniel Whalen says
I love your videos but please slow down on how to do it, older persons need to see it slowly.
WPBeginner Support says
Thank you for your feedback on our video!
Administrator
Phil says
Is there a way to batch replace? I’m a photographer and sometimes have over 100 images per blog post. I wanted to replace them with smaller file sizes to help with my pages speeds. Is this possible?
Many thanks
WPBeginner Support says
Not manually but there are plugins to help make the process easier for you that we cover in our list below:
https://www.wpbeginner.com/plugins/best-wordpress-image-compression-plugins-compared/
Administrator
Jeff Vetterick says
If I use the plugin to just „replace image only” (with one of the same file name) will the alt text, image description, and image caption of the original image be overwritten or preserved. If they are preserved, this would save me a ton of time.
WPBeginner Support says
It should keep that information if it is able, you would want to reach out to the plugin’s support for specifics.
Administrator
jg says
This option isn’t available in the new version as it just allows you to delete or edit it. if I delete it I don’t know the url to replace it with?
WPBeginner Support says
You may want to ensure you are in the correct view for your media library as the feature is currently available
Administrator
Sanjay Sajeev says
Thank you for your post.
I installed enable media replace plugin in my site. But when I replace an image that I used in a blog post, I can see the image has been replaced in the media library. But When I check that image in the blog post, there is no change to that image and its file size. What I have to do to resolve this?
WPBeginner Support says
You may want to try clearing your cache and if that does not work, reach out to the plugin’s support for them to take a look at possible issues.
Administrator
Linda Joyce says
Can I do the same thing manually by replacing the image via FTP? Will that change the image?
WPBeginner Support says
Hi Linda,
That would work. But WordPress will not be able to regenerate thumbnails and image sizes.
Administrator
Rehan says
Can I disable this plugin permanently after all images have been replaced in media library ?
Fede says
Hi. I keep getting request timeout. Same as when uploading using usual wp means. That is why I had to switch to uploading via ftp and then loading them through a plugin meant for that. I really need to get this working since some of the images are not scaling properly nd need to change them. Any help would be apreciated. Thanks.
hitesh says
Hi
in my wordpress admin there is no any option like replace media..in mine there are only 3 options 1) EDIT 2) DELETE PREMANENTLY 3) VIEW
So what is the issue there ..its old version or have any other issue can u please clear that so that i can replace that media files
Regards
Hitesh
Luke says
That’s why you need to install the mentioned plugin.
Nicole says
Help
I’m a perfrormer contacting agents and tried to replace voice reels after successfully installing yourplugin ( thought it was safest way to go )
Now htey are blanks – I’ve cleared browsing cache
I followed the instructions
my media player is this :
svnlabs HTML5 Mp3 player 3.6 installed
please help :0
Riccardo says
Hi thanks for the article, the plugin works great. There’s one thing I don’t get though: the image replacement seems to only affect the image in its original size, when the site displays the image in other formats (thumbnails, previews, etc…) I can still see the old image file.
How can I force the image replacement on all the other image files (e.g. imagename-300×200.jpg)?
thank you
Rehan says
Please use Regenerate thumbnails plugin to regenerate your images. after that you will see the replaced images.
Leed says
Thanks a lot.
You help me for this problem.
Panagiotis Tabakis says
The Enable Media Replace plugin poses a security threat, I would totally avoid it. Its a shame to suggest users to use dangerous software. Please research before posting.
The exploit holds since 2011.
For more info see
WPBeginner Support says
Hi Panagiotis,
The issue was immediately resolved by the plugin author in the very next release (please see plugin’s changelog and scroll down to version 2.4).
This is why we recommend users to keep their WordPress site and plugins updated.
Administrator
Panagiotis Tabakis says
Yes, you are correct. I’m sorry, I saw a support post which the plugin author didn’t answer and thought it wasn’t resolved.
The exploit was patched @ 09 February 2011 (the same day).
I wonder why the author hasn’t replied but I will inform the forum users.
Again, sorry.
WPBeginner Support says
No problem
It’s good to be cautious about security issues. Hopefully, your answer on the support forums will help other users.
Blake says
I am running WP 4.6.1 bootstrap and I want to remove a background photo and replace it with one that is in my galley. Can you tell me how to do it, Thanks
Sky says
I followed the steps and in the library the new image is displayed but where the image is located on the home page remains the old photo. Not sure what to do…
Christian Scholz-Flöter says
Maybe it’s a browser cache related issue and you need to clean/delete the browser cache. If you don’t know how to do it, google your browser’s brand name and „clear browser cache”.
jorge says
This plugin works great in the media page. However I would like to also replace images/media from within the media modal window inside a post/page edit page without leaving the page. Any ideas?
Thanks for this amazing post!
Marilyn says
I wish I had known this sooner! I didn’t detach my media files before I deleted them. I replaced them with a new image. The problem is that resulted in broken images. Even though I go back and reattach/choose the correct image down the road it breaks again. In my Easy recipe program I see the placeholder for the deleted image and the program searching for it. Is there a fix for this? Unfortunately there are about 200 files doing this.
Rosy says
Hi, unfortunately the „replace media” link is not showing as an option?