diff --git a/openstack/imageservice/v2/images/testing/requests_test.go b/openstack/imageservice/v2/images/testing/requests_test.go
index 788eec4..fdd8402 100644
--- a/openstack/imageservice/v2/images/testing/requests_test.go
+++ b/openstack/imageservice/v2/images/testing/requests_test.go
@@ -44,6 +44,19 @@
 	th.AssertEquals(t, 3, count)
 }
 
+func TestAllPagesImage(t *testing.T) {
+	th.SetupHTTP()
+	defer th.TeardownHTTP()
+
+	HandleImageListSuccessfully(t)
+
+	pages, err := images.List(fakeclient.ServiceClient(), nil).AllPages()
+	th.AssertNoErr(t, err)
+	images, err := images.ExtractImages(pages)
+	th.AssertNoErr(t, err)
+	th.AssertEquals(t, 3, len(images))
+}
+
 func TestCreateImage(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
diff --git a/pagination/pager.go b/pagination/pager.go
index 1b5192a..76e4af1 100644
--- a/pagination/pager.go
+++ b/pagination/pager.go
@@ -145,27 +145,26 @@
 
 	// Switch on the page body type. Recognized types are `map[string]interface{}`,
 	// `[]byte`, and `[]interface{}`.
-	switch testPage.GetBody().(type) {
+	switch pb := testPage.GetBody().(type) {
 	case map[string]interface{}:
 		// key is the map key for the page body if the body type is `map[string]interface{}`.
 		var key string
 		// Iterate over the pages to concatenate the bodies.
 		err = p.EachPage(func(page Page) (bool, error) {
 			b := page.GetBody().(map[string]interface{})
-			for k := range b {
+			for k, v := range b {
 				// If it's a linked page, we don't want the `links`, we want the other one.
 				if !strings.HasSuffix(k, "links") {
-					key = k
+					switch vt := v.(type) {
+					case map[string]interface{}:
+						key = k
+						pagesSlice = append(pagesSlice, vt)
+					case []interface{}:
+						key = k
+						pagesSlice = append(pagesSlice, vt...)
+					}
 				}
 			}
-			switch keyType := b[key].(type) {
-			case map[string]interface{}:
-				pagesSlice = append(pagesSlice, keyType)
-			case []interface{}:
-				pagesSlice = append(pagesSlice, b[key].([]interface{})...)
-			default:
-				return false, fmt.Errorf("Unsupported page body type: %+v", keyType)
-			}
 			return true, nil
 		})
 		if err != nil {
@@ -216,7 +215,7 @@
 	default:
 		err := gophercloud.ErrUnexpectedType{}
 		err.Expected = "map[string]interface{}/[]byte/[]interface{}"
-		err.Actual = fmt.Sprintf("%v", reflect.TypeOf(testPage.GetBody()))
+		err.Actual = fmt.Sprintf("%T", pb)
 		return nil, err
 	}
 
