How We Improved Our Core Web Vitals (Case Study)

Last year, Google started emphasizing the importance of Core Web Vitals and how they reflect a person’s real experience when visiting sites around the web. Performance is a core feature of our company, Instant Domain Search—it’s in the name. Imagine our surprise when we found that our vitals scores were not great for a lot…

Five Ways to Remove Backgrounds in Photoshop in 2021

Remove a Background in Photoshop Quickly & Easily – SitePointSkip to main contentFree JavaScript Book!Write powerful, clean and maintainable JavaScript.RRP $11.95 With many advances to Photoshop over the last several years, removing the background from an image has never been easier or quicker. Knowing the best method to use for the type of image you’re working with is key to getting the best results with the best technique available.
Here are five ways to remove backgrounds from your photos using Photoshop CC, along with when to use each technique to achieve the best results.
All images used in this article were found on Unsplash.
1. Photoshop Quick Action
Best to use when: you’re doing it for you, you need it fast, and you’re not necessarily looking for perfection. Best to use with high contrast between subject and background, and when the subject has fairly simplistic lines.
By far the quickest method discussed here is the built-in Photoshop Quick Action for removing backgrounds in Photoshop. This is new in Photoshop 2021 (in the Creative Cloud subscription) and provides a very fast way to remove backgrounds.
With speed, however, comes less accuracy. Using Photoshop Quick Action will do most of the work for you, but the results may fall short of your expectations, depending on your image. If that’s the case, you can use any of the methods described here to polish up the result.
Steps:

With your image open in Photoshop, right click your Background layer and click Duplicate Layer. In the dialog box that pops up, name your layer (whatever you’d like), and click OK. Click the eye icon to the left of the original layer to turn that layer off.

Make sure your Properties panel is open by going to Window > Properties. (If it was already checked, there’s no need to click it; if it isn’t checked, click it to open it up on the right-hand side by default.)

In your Layers panel, click your new layer. In the Properties panel (by default this should be above your Layers panel), click the Remove Background button under Quick Action.

The quick action has now removed the background, leaving your layer with a mask around the subject.

From here, you can make refinements by going into the mask and adjusting as needed (such as around the dog’s feet at the bottom left of the image). While outside the scope of this article, if you need help with working with masks, check out this Adobe tutorial.
Photo credit: Karsten Wingert on Unsplash

Best to use when: working with high contrast images, although it takes a fair bit of time and effort to produce a good outcome.
The Background Eraser tool is great if you need a bit more control over removing the background but still want Photoshop to do some of the heavy lifting for you. For more control, you’ll have to sacrifice some time to get the desired result. Depending on your photo, using the Background Eraser tool could be highly effective and a time saver and/or get you closer to your desired outcome with some time involved.
Steps:

With your image open in Photoshop, right click your Background layer and click Duplicate Layer. In the dialog box that pops up, name your layer (whatever you’d like), and click OK. Click the eye icon to the left of the original layer to turn that layer off.

Select the Background Eraser tool from the toolbox on the left-hand side. This tool may be hidden below the Eraser tool. Click and hold the Eraser tool to reveal more options to and select the Background Eraser tool.

In the tool options bar at the top of the screen, click the brush icon to reveal the brush panel.

Change the hardness so that it’s near or at 100%.

The size can be whatever you deem appropriate for the image you’re working with. In this case, I’m starting with 50px.

You can adjust it as we go by using the square brackets ([ and ]) to decrease and increase the size of the brush.

Still in the tool options bar at the top, set the Sampling to be Continuous. It’s the first of three icons after the brush size option. Next, set the Limits to Find Edges and the Tolerance to be somewhere in the range of 20–25%.

Note that the lower the tolerance, the fewer color variations it will pick up. Conversely, the higher the tolerance, the more colors the tool will select.

Start erasing the background around your subject using the Background Eraser tool by clicking and holding while moving the brush. The goal here is to keep the crosshairs inside the tool from touching your subject. Zoom in on the image if you need to see more close details.

I recommend you do short strokes with the brush (remembering to let go of the mouse from time to time) so that you can always Undo if the brush goes too far.

In the more difficult areas, you may find that you need to adjust the size of your brush as you go. You can do this by revisiting the tools option bar at the top, or using [ and ] to adjust down and up the size of your brush.

If resizing the brush doesn’t work and it’s erasing your subject, undo your action, then go into the tool options bar at the top and adjust the Sampling to Once (the middle icon in the set of three), the Limits to Discontiguous, and Tolerance to around 10%. This is telling the brush to only use the color under the crosshairs in that moment and not resample as you go along.

This process can be quick or tedious depending on your image, but provides good results, as you’re in control of determining what is the subject and what isn’t. If this doesn’t complete the job, other methods mentioned here could help you get closer to your desired result.
For more detailed info on the Background Eraser tool, check out this Adobe tutorial.
Photo credit: Enrique Ortega Miranda on Unsplash

Best to use when: the subject and background are not highly contrasted, or when other tools such as the Quick Action or Background Eraser tool mentioned above aren’t producing desired results. It gives you the most control out of all the methods listed here.
The Pen tool is one of the most tried and true ways in Photoshop to remove backgrounds in images, and gives you the most control over the outcome. Because it gives you the most control, it can also be the most time-consuming and requires patience.
Steps:

With your image open in Photoshop, right click your Background layer and click Duplicate Layer. In the dialog box that pops up, name your layer (whatever you’d like), and click OK. Click the eye icon to the left of the original layer to turn that layer off.

Select the Pen tool from the toolbox on the left-hand side (above the Text tool). Zoom in to an area of your image to start. Start at the edge of your subject (or a suitable starting point) and click to start the first anchor. Then start working your way around your subject adding additional anchors to start outlining your subject.

If you need to make a curved line, click-hold-drag to produce a curved line, moving the mouse to adjust the curve as needed.

To adjust an anchor point or directional lines for fine tuning, use the Direct Selection tool (hidden under the Path Selection tool) in the toolbox.

To undo an anchor, go to File > Undo or use your keyboard shortcut (Command + Z for macOS, Control + Z for Windows).

For more info about the Pen tool and working with paths in Photoshop, read this Adobe tutorial.

Make sure you complete the path once you’re done by meeting up with your first point. Once you’ve completed the path and you’re happy with the results, you’ll want to save the path. Go to Window > Paths to reveal the Paths panel (it should appear on the right-hand side by default). Click the three bar menu at the right and click New Path, and name your path. Now your path is saved in the Paths panel.

Next, right click your new path in the Paths panel and select Make Selection, then click OK in the dialog box (leave all defaults for now). This will give you the marching ants outline where your path was.

Since we don’t want to delete what’s inside the selection, we’ll want to change the selection to be everything except the subject. Go to Select > Inverse. You’ll see the marching ants are now around the entire image and the subject, essentially selecting the background.

To delete the background, press Delete. You should now see the white/gray checkered background instead of your previous background.

You may find, as with the other methods listed, that this doesn’t get you 100%. Using a combination of the Pen tool and other methods here will help you get closer to your desired result. (For instance, I would use a different method to help refine the woman’s eyelash area in this particular photo.)
For more detailed info on the Pen tool, have a look at this Adobe tutorial.
Photo credit: Kim Carpenter on Unsplash

Best to use when: the subject is mostly high contrasted from the background and with complex edges, and where want to save time and have Photoshop detect the path for you.
If the Pen tool is too labor-intensive, or you don’t want to take the time to draw out your subject, the Magnetic Lasso tool may be a good starting point for quickly getting you where you need to be so you can spend your time refining the details.
Steps:

With your image open in Photoshop, right click your Background layer and click Duplicate Layer. In the dialog box that pops up, name your layer (whatever you’d like), and click OK. Click the eye icon to the left of the original layer to turn that layer off.

Select the Magic Lasso tool from the toolbox on the left. Start drawing along the edge of your subject with the tool. You’ll see it will start drawing the path for you as you move your cursor. Patience is key here, as you’ll want to be slow, steady, and deliberate with your moves.

Once you’ve started the tool, you’ll need to go around your subject completely and connect to your starting point. Once you’ve made it back around to the beginning, click the starting point. The selection will then turn into marching ants around your selection.

Save your selection by going to Selection > Save Selection and giving it a name.

To delete the background, go to Select > Inverse to invert the marching ants (they should now be running around the edge of the image and your subject). Click delete. You should now see the white/gray checkered background instead of your previous background.

If you feel you need to make adjustments to the selection, you can backtrack a couple of steps and redo them to get better results, or use a combination of other techniques listed in this article to get you closer to your desired result.
For more detailed info about how the Magnetic Lasso tool works, check out this Adobe tutorial.
Photo credit: Dlanor S on Unsplash

Best to use when: the subject is somewhat contrasted and/or the image has “wispy” or intricate details, or when you want to save time and need decent accuracy and the ability to quickly refine.
The Quick Selection tool is perhaps my favorite method here, because it’s the fastest way to select a subject and allows for quicker refinements. It also can be used on a much wider range of possible photos than other methods listed here, because it works by detecting color changes to determine where the selection should be.
Steps:

With your image open in Photoshop, right click your Background layer and click Duplicate Layer. In the dialog box that pops up, name your layer (whatever you’d like), and click OK. Click the eye icon to the left of the original layer to turn that layer off.

Select the Quick Selection tool from the toolbox on the left (may be hidden under the Object Selection tool).

Using the tool, start painting your subject. You’ll see the marching ants start appearing while you paint. To adjust your tool size, use the [ or ] keys to decrease or increase the size.

If you find you’ve painted outside of the subject, click and hold the Option key (macOS) or Alt key (Windows) and you’ll see the center of the tool turn from a + symbol to a – symbol, indicating it will now take away from the selection. Paint on the part of the selection you want to remove while holding the Option/Alt key.

Once you have everything selected the way you want, save the selection by going to Select > Save Selection and giving it a name. This is in case you want to come back and make adjustments.

To delete the background, go to Select > Inverse to inverse the marching ants (they should now be running around the edge of the image and your subject). Click delete.

If you find you’ve missed a spot or need further refinements, you can backtrack a couple of steps to do the refinement and resave your selection and try again.
For more detailed information on how the Quick Selection tool works, have a look at this Adobe tutorial.
Photo credit: Natural Goods Berlin on Unsplash
Removing Backgrounds Has Never Been Easier
Through these methods in Photoshop, it has never been easier to remove a background from an image in Photoshop. Whether you’re looking for a quick and easy way to pull a subject out of a photo, or you need a way to replace the background of a more detailed image, the methods above will help you get to your end result much quicker and with better results.
Knowing which method to use and when will not only make your workflow go much quicker, but you’ll also end up with a much better final image.
Finally, depending on your ultimate use case, if you need to save your image without the background, don’t forget to save it as a transparent PNG so that you can use it in other applications and maintain your new background-free image.
Related ArticlesMoving Backgrounds: When, Why, and How to Use ThemDesign & UXBy

I've been tweeting one UI/UX lesson every day for 50 days. Then I revised & compiled them into my first book ever.

You’re preaching some very interesting stuff, which I’m already applying in my designs as well. The content is great, but then you’re packaging it in what essentially helps kill user trust; the email marketing campaign/funnel wall.You’re asking for an email address to send a public link to the book. Obviously you’re into building an email list to spam contact later with some other stuff that you can make a buck on. Then you say you’re not going to spam me, but you don’t have any control over what I consider spam.Don’t take this the wrong way, I’m not criticizing you for doing it, but I worked for 2 years for a big fish in the Email Marketing and Digital Publishing e-learning niche, where they teach these approaches to everybody, and now I know of a lot of idiotic techniques of collecting user information and “trust building”. It’s pathetic and completely misleading for the end user.Therefore, the reason I tell you this is to say that this goes against your actual content and ends up downgrading its value. Your content is great, adds value, and then you’re using a misleading technic to spread it. This might work in the sense that you will build an email list, as it does already for billion dollar businesses, but it also subtracts value from your information, in the case of users that already distrust this approach. You’ve already got a comment about giving up the email, so the list of users smelling something fishy behind this technique is already pretty large.Furthermore, if you leave it as it is, you’re going to end up with three main scenarios:The people that are not realizing this technique is bad will fill up your list, but they’re usually also the type of person that never spends anything on the internet, because they don’t get it. And yes, this applies to web designers.People that distrust this system will circumvent it by using services like Mailinator to create temp email addresses to get the PDF. So you’re going to send a bunch of emails to nobody.People completely distrusting this system will not even bother to give you an email and leave the website.Keep in mind that you’re “selling” information, you’re not selling something that uneducated people can use, where gathering emails of people that don’t realize this yet might still be useful.Hence, you’re now in a position of building an email list to sell something to later, but you’re going to end up mostly with people that don’t spend. That’s also why the lead conversions in these things got below 10%. People building these nowadays actually are told by “experts” to expect 100k emails to sell to at most 10k people, knowingly sending 90% spam emails.You might say you don’t intend to sell anything later, just want to send new information. There’s no such thing. Why bother with creating an email campaign and paying for sending emails to services like MailChimp to send free information?You’ll probably be better off making something like this: https://goodui.org/All the information is accessible without giving up anything, but they also ask for the email.I’m writing all this wanting to believe that you didn’t premeditate this and somebody “smart” just saw what you were doing with the articles and suggested this new-age business idea of creating the PDF and locking it behind an email campaign funnel, so you didn’t actually realize all this. But if you did think it out like this from the get go, knowing that the email step is completely unnecessary and its main purpose is to build a list to sell to later, then downvote away and good luck!

HTTP requests on GoCardless API help

I’m having some problems with the go cardless api and was hoping someone could point out where im going wrong.I’m still reasonably new to web development so i could just be missing something or doing something completely wrong but any help would be appreciated.At the moment I’m just trying to get post requests to work in hoppscotch.io and they are throwing an errorim basically following the information here to set up everything https://developer.gocardless.com/api-reference/#core-endpoints-customersI have a post request going to https://api-sandbox.gocardless.com/customersthe body as raw json is{“customers”: {“email”: “user@example.com”,”given_name”: “Frank”,”family_name”: “Osborne”,”address_line1″: “27 Acer Road”,”address_line2″: “Apt 2″,”city”: “London”,”postal_code”: “E8 3GX”,”country_code”: “GB”,”metadata”: {“salesforce_id”: “ABCD1234″}}}which is just taken from the example code in in the link aboveand my headers are set as”Content-Type: application/json; charset=utf-8″,”Authorization: Bearer {{secret_key}}”,”GoCardless-Version: 2015-07-06″,”Accept: application/json”,”Content-Type: application/json”,”Content-Length: 3495″when i post it im getting status 422and{“error”: {“message”: “Validation failed”,”errors”: [{“field”: “email”,”message”: “can’t be blank”,”request_pointer”: “/customers/email”},{“field”: “base”,”message”: “Specify either a personal name or a company name”,”request_pointer”: “/customers/base”} ],”documentation_url”: “https://developer.gocardless.com/api-reference#validation_failed”,”type”: “validation_failed”,”request_id”: “0AA40E29CC61_AC1220D61F92_609E9A6E_94830001″,”code”: 422}}I assume this is some problem with how ive sent the data but have no idea how to change to make it work.if anyone has any ideas or can see what I’m doing wrong it would really help me outthanks