Instead of utilizing
transform: translate(-50%, -50%);
Use
transform: translateX(-50%);
Additionally, you assigned a class col-lg-8 to the body with the position set to relative. By changing the position to 'initial', you will achieve vertical alignment for the image.
.col-lg-8 {
position: initial !important;
}
.image-container {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
position: absolute;
}
img {
width: 100%;
}
.col-lg-8 {
position: initial !important;
}
<!DOCTYPE html>
<html>
<head>
<link data-require="bootstrap@*" data-semver="4.0.5" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" />
<script data-require="bootstrap@*" data-semver="4.0.5" src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="style.css" />
<script src="script.js"></script>
</head>
<nav class="navbar navbar-toggleable-md navbar-light bg-faded">
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="#">Navbar</a>
<div class="collapse navbar-collapse" id="SupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" >Link</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#">Disabled</a>
</li>
</ul>
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="text" placeholder="Search">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
</form>
</div>
</nav>
<body class="col-lg-8">
<div class="image-container">
<img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5OjcBCgoKDQwNGg8PGjclHyU3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3N//AABEIAHgA1QMBIgACEQEDEQH/xAAbAAABBQEBAAAAAAAAAAAAAAAFAAIDBAYBB//EADoQAAIBAwMBBgQEBgEDBQAAAAECAwAEEQUSITEGEyJBUWEUcYGRMkKh0SOxweHw8VIHQ2IVJHKSwv/EABoBAAIDAQEAAAAAAAAAAAAAAAMEAQIFAAb/xAAkEQACAwACAgIDAAMAAAAAAAAAAQIDERIhBDETQQUiUSNxgf/aAAwDAQACEQMRAD8A9JFOGfSnKoqVVFOchTBiinBadwKQqNJwYV5p6pTgBSNRp2ImhOyp+/A86qDOKacfm4qrimXU2i78Qo68/KheoXJRSyl1/wDL0rk0yIMFwvzPWhl5cqVIWYgeeG4/agWTrr9sYrrss9IH3XaaWzm2SklTz3g5X65qnPrrW0nfW5/hOCyqPIjqM/qKAa3cZklhYFA2WXPGfkRUWl79qx3Qzg+E+TDy+uMis+3z1FdGjV4Dk+zR6n2naGecttBXEqY+Q/nj9an0Ltla2+hh5pQZ2fZGpI5xxXn/\b